Module cpufeatures

The cpufeatures module offers properties for enabling or disabling specific CPU features. Use it if you want to override the compiler defaults for a given platform.

The compiler rules in the cpp module evaluate this module's properties and generate matching compiler flags. All properties in this module are of type bool and have the following semantics:

  • The default value undefined has no effect on the compiler command line.
  • If the value is true and the compiler has a flag to enable the feature, that flag is added to the command line if it is applicable to the current architecture. For example, enabling the property x86_sse2 would result in the GCC option -msse2.
  • If the value is false and the compiler has a flag to disable the feature, that flag is added to the command line if it is applicable to the current architecture. For example, disabling the property x86_sse2 would result in the GCC option -no-msse2.

cpufeatures Properties

PropertyTypeSinceDefaultDescription
arm_neonbool1.10undefinedWhether to use NEON instructions in ARM binaries.
arm_vfpv4bool1.10undefinedWhether to use VFPv4 instructions in ARM binaries.
mips_dspbool1.10undefinedWhether to use DSP instructions in MIPS binaries.
mips_dspr2bool1.10undefinedWhether to use DSPr2 instructions in MIPS binaries.
x86_avxbool1.10undefinedWhether to use AVX instructions in x86 binaries.
x86_avx2bool1.10undefinedWhether to use AVX2 instructions in x86 binaries.
x86_avx512bwbool1.10undefinedWhether to use AVX-512-BW instructions in x86 binaries.
x86_avx512cdbool1.10undefinedWhether to use AVX-512-CD instructions in x86 binaries.
x86_avx512dqbool1.10undefinedWhether to use AVX-512-DQ instructions in x86 binaries.
x86_avx512erbool1.10undefinedWhether to use AVX-512-ER instructions in x86 binaries.
x86_avx512fbool1.10undefinedWhether to use AVX-512 instructions in x86 binaries.
x86_avx512ifmabool1.10undefinedWhether to use AVX-512-IFMA instructions in x86 binaries.
x86_avx512pfbool1.10undefinedWhether to use AVX-512-PF instructions in x86 binaries.
x86_avx512vbmibool1.10undefinedWhether to use AVX-512-VBMI instructions in x86 binaries.
x86_avx512vlbool1.10undefinedWhether to use AVX-512-VL instructions in x86 binaries.
x86_f16cbool1.10undefinedWhether to use F16C instructions in x86 binaries.
x86_sse2bool1.10undefinedWhether to use SSE2 instructions in x86 binaries.
x86_sse3bool1.10undefinedWhether to use SSE3 instructions in x86 binaries.
x86_ssse3bool1.10undefinedWhether to use SSSE3 instructions in x86 binaries.
x86_sse4_1bool1.10undefinedWhether to use SSE4.1 instructions in x86 binaries.
x86_sse4_2bool1.10undefinedWhether to use SSE4.2 instructions in x86 binaries.

© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.