summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qsimd_x86.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-06-20 19:08:14 -0700
committerThiago Macieira <thiago.macieira@intel.com>2018-06-25 18:49:28 +0000
commitf6d9cc5b79d545be0c64ff6fd85131a89ee21edd (patch)
tree42ead74a188d61c4011bb61fc876ffee0938fe35 /src/corelib/tools/qsimd_x86.cpp
parent74ce4ffff6cd771a558790c7f602387491ffeb5a (diff)
SIMD: Refactor the constants to be actual bit values
... instead of being the bit numbers. This allows us to test more than one feature at a time with qCpuHasFeature (see commit about the Haswell architecture features). The drawback is that we won't be able to handle more than 63 different CPU features, though we're likely quite far from it (x86 currently has only 36 features). Change-Id: Iff4151c519c144d580c4fffd153a0acbfd74c2c6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/corelib/tools/qsimd_x86.cpp')
-rw-r--r--src/corelib/tools/qsimd_x86.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/corelib/tools/qsimd_x86.cpp b/src/corelib/tools/qsimd_x86.cpp
index 8275f964d8..509af464b2 100644
--- a/src/corelib/tools/qsimd_x86.cpp
+++ b/src/corelib/tools/qsimd_x86.cpp
@@ -1,6 +1,6 @@
// This is a generated file. DO NOT EDIT.
// Please see util/x86simdgen/generate.pl
-#include <qglobal.h>
+#include "qsimd_p.h"
static const char features_string[] =
" sse2\0"
@@ -96,3 +96,21 @@ static const quint8 x86_locators[] = {
Leaf7_0EDX*32 + 2, // avx5124nniw
Leaf7_0EDX*32 + 3 // avx5124fmaps
};
+
+// List of AVX512 features (see detectProcessorFeatures())
+static const quint64 AllAVX512 = 0
+ | CpuFeatureAVX512F
+ | CpuFeatureAVX512DQ
+ | CpuFeatureAVX512IFMA
+ | CpuFeatureAVX512PF
+ | CpuFeatureAVX512ER
+ | CpuFeatureAVX512CD
+ | CpuFeatureAVX512BW
+ | CpuFeatureAVX512VL
+ | CpuFeatureAVX512VBMI
+ | CpuFeatureAVX512VBMI2
+ | CpuFeatureAVX512VNNI
+ | CpuFeatureAVX512BITALG
+ | CpuFeatureAVX512VPOPCNTDQ
+ | CpuFeatureAVX5124NNIW
+ | CpuFeatureAVX5124FMAPS;