cpu.features
This property gets instruction sets supported by the CPU, as a table with the following fields:
MMX:trueif the CPU supports MMX instruction set, orfalseotherwise.SSE:trueif the CPU supports SSE instruction set, orfalseotherwise.SSE2:trueif the CPU supports SSE2 instruction set, orfalseotherwise.SSE3:trueif the CPU supports SSE3 instruction set, orfalseotherwise.SSSE3:trueif the CPU supports SSSE3 instruction set, orfalseotherwise.SSE4_1:trueif the CPU supports SSE4.1 instruction set, orfalseotherwise.SSE4_2:trueif the CPU supports SSE4.2 instruction set, orfalseotherwise.AVX:trueif the CPU supports AVX instruction set, orfalseotherwise.AVX2:trueif the CPU supports AVX2 instruction set, orfalseotherwise.
Example
--! luart-extensions
import cpu
for feature, supported in pairs(cpu.features) do
print(feature..":\t", supported and "supported" or "not supported")
end