QtBase  v6.3.1
qsimd_x86_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2018 Intel Corporation.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the QtCore module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see https://www.qt.io/terms-conditions. For further
15 ** information use the contact form at https://www.qt.io/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 3 requirements
23 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24 **
25 ** GNU General Public License Usage
26 ** Alternatively, this file may be used under the terms of the GNU
27 ** General Public License version 2.0 or (at your option) the GNU General
28 ** Public license version 3 or any later version approved by the KDE Free
29 ** Qt Foundation. The licenses are as published by the Free Software
30 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31 ** included in the packaging of this file. Please review the following
32 ** information to ensure the GNU General Public License requirements will
33 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34 ** https://www.gnu.org/licenses/gpl-3.0.html.
35 **
36 ** $QT_END_LICENSE$
37 **
38 ****************************************************************************/
39 
40 // This is a generated file. DO NOT EDIT.
41 // Please see util/x86simdgen/generate.pl
42 #ifndef QSIMD_P_H
43 # error "Please include <private/qsimd_p.h> instead"
44 #endif
45 #ifndef QSIMD_X86_P_H
46 #define QSIMD_X86_P_H
47 
48 #include "qsimd_p.h"
49 
50 //
51 // W A R N I N G
52 // -------------
53 //
54 // This file is not part of the Qt API. It exists purely as an
55 // implementation detail. This header file may change from version to
56 // version without notice, or even be removed.
57 //
58 // We mean it.
59 //
60 
62 
63 // used only to indicate that the CPU detection was initialized
64 #define QSimdInitialized (Q_UINT64_C(1) << 0)
65 
66 // in CPUID Leaf 1, EDX:
67 #define CpuFeatureSSE2 (Q_UINT64_C(1) << 1)
68 #define QT_FUNCTION_TARGET_STRING_SSE2 "sse2"
69 
70 // in CPUID Leaf 1, ECX:
71 #define CpuFeatureSSE3 (Q_UINT64_C(1) << 2)
72 #define QT_FUNCTION_TARGET_STRING_SSE3 "sse3"
73 #define CpuFeatureSSSE3 (Q_UINT64_C(1) << 3)
74 #define QT_FUNCTION_TARGET_STRING_SSSE3 "ssse3"
75 #define CpuFeatureFMA (Q_UINT64_C(1) << 4)
76 #define QT_FUNCTION_TARGET_STRING_FMA "fma"
77 #define CpuFeatureSSE4_1 (Q_UINT64_C(1) << 5)
78 #define QT_FUNCTION_TARGET_STRING_SSE4_1 "sse4.1"
79 #define CpuFeatureSSE4_2 (Q_UINT64_C(1) << 6)
80 #define QT_FUNCTION_TARGET_STRING_SSE4_2 "sse4.2"
81 #define CpuFeatureMOVBE (Q_UINT64_C(1) << 7)
82 #define QT_FUNCTION_TARGET_STRING_MOVBE "movbe"
83 #define CpuFeaturePOPCNT (Q_UINT64_C(1) << 8)
84 #define QT_FUNCTION_TARGET_STRING_POPCNT "popcnt"
85 #define CpuFeatureAES (Q_UINT64_C(1) << 9)
86 #define QT_FUNCTION_TARGET_STRING_AES "aes,sse4.2"
87 #define CpuFeatureAVX (Q_UINT64_C(1) << 10)
88 #define QT_FUNCTION_TARGET_STRING_AVX "avx"
89 #define CpuFeatureF16C (Q_UINT64_C(1) << 11)
90 #define QT_FUNCTION_TARGET_STRING_F16C "f16c"
91 #define CpuFeatureRDRND (Q_UINT64_C(1) << 12)
92 #define QT_FUNCTION_TARGET_STRING_RDRND "rdrnd"
93 
94 // in CPUID Leaf 7, Sub-leaf 0, EBX:
95 #define CpuFeatureBMI (Q_UINT64_C(1) << 13)
96 #define QT_FUNCTION_TARGET_STRING_BMI "bmi"
97 #define CpuFeatureHLE (Q_UINT64_C(1) << 14)
98 #define QT_FUNCTION_TARGET_STRING_HLE "hle"
99 #define CpuFeatureAVX2 (Q_UINT64_C(1) << 15)
100 #define QT_FUNCTION_TARGET_STRING_AVX2 "avx2"
101 #define CpuFeatureBMI2 (Q_UINT64_C(1) << 16)
102 #define QT_FUNCTION_TARGET_STRING_BMI2 "bmi2"
103 #define CpuFeatureRTM (Q_UINT64_C(1) << 17)
104 #define QT_FUNCTION_TARGET_STRING_RTM "rtm"
105 #define CpuFeatureAVX512F (Q_UINT64_C(1) << 18)
106 #define QT_FUNCTION_TARGET_STRING_AVX512F "avx512f"
107 #define CpuFeatureAVX512DQ (Q_UINT64_C(1) << 19)
108 #define QT_FUNCTION_TARGET_STRING_AVX512DQ "avx512dq"
109 #define CpuFeatureRDSEED (Q_UINT64_C(1) << 20)
110 #define QT_FUNCTION_TARGET_STRING_RDSEED "rdseed"
111 #define CpuFeatureAVX512IFMA (Q_UINT64_C(1) << 21)
112 #define QT_FUNCTION_TARGET_STRING_AVX512IFMA "avx512ifma"
113 #define CpuFeatureAVX512PF (Q_UINT64_C(1) << 22)
114 #define QT_FUNCTION_TARGET_STRING_AVX512PF "avx512pf"
115 #define CpuFeatureAVX512ER (Q_UINT64_C(1) << 23)
116 #define QT_FUNCTION_TARGET_STRING_AVX512ER "avx512er"
117 #define CpuFeatureAVX512CD (Q_UINT64_C(1) << 24)
118 #define QT_FUNCTION_TARGET_STRING_AVX512CD "avx512cd"
119 #define CpuFeatureSHA (Q_UINT64_C(1) << 25)
120 #define QT_FUNCTION_TARGET_STRING_SHA "sha"
121 #define CpuFeatureAVX512BW (Q_UINT64_C(1) << 26)
122 #define QT_FUNCTION_TARGET_STRING_AVX512BW "avx512bw"
123 #define CpuFeatureAVX512VL (Q_UINT64_C(1) << 27)
124 #define QT_FUNCTION_TARGET_STRING_AVX512VL "avx512vl"
125 
126 // in CPUID Leaf 7, Sub-leaf 0, ECX:
127 #define CpuFeatureAVX512VBMI (Q_UINT64_C(1) << 28)
128 #define QT_FUNCTION_TARGET_STRING_AVX512VBMI "avx512vbmi"
129 #define CpuFeatureAVX512VBMI2 (Q_UINT64_C(1) << 29)
130 #define QT_FUNCTION_TARGET_STRING_AVX512VBMI2 "avx512vbmi2"
131 #define CpuFeatureGFNI (Q_UINT64_C(1) << 30)
132 #define QT_FUNCTION_TARGET_STRING_GFNI "gfni"
133 #define CpuFeatureVAES (Q_UINT64_C(1) << 31)
134 #define QT_FUNCTION_TARGET_STRING_VAES "vaes"
135 #define CpuFeatureAVX512VNNI (Q_UINT64_C(1) << 32)
136 #define QT_FUNCTION_TARGET_STRING_AVX512VNNI "avx512vnni"
137 #define CpuFeatureAVX512BITALG (Q_UINT64_C(1) << 33)
138 #define QT_FUNCTION_TARGET_STRING_AVX512BITALG "avx512bitalg"
139 #define CpuFeatureAVX512VPOPCNTDQ (Q_UINT64_C(1) << 34)
140 #define QT_FUNCTION_TARGET_STRING_AVX512VPOPCNTDQ "avx512vpopcntdq"
141 
142 // in CPUID Leaf 7, Sub-leaf 0, EDX:
143 #define CpuFeatureAVX5124NNIW (Q_UINT64_C(1) << 35)
144 #define QT_FUNCTION_TARGET_STRING_AVX5124NNIW "avx5124nniw"
145 #define CpuFeatureAVX5124FMAPS (Q_UINT64_C(1) << 36)
146 #define QT_FUNCTION_TARGET_STRING_AVX5124FMAPS "avx5124fmaps"
147 
148 static const quint64 qCompilerCpuFeatures = 0
149 #ifdef __SSE2__
151 #endif
152 #ifdef __SSE3__
154 #endif
155 #ifdef __SSSE3__
157 #endif
158 #ifdef __FMA__
159  | CpuFeatureFMA
160 #endif
161 #ifdef __SSE4_1__
163 #endif
164 #ifdef __SSE4_2__
166 #endif
167 #ifdef __MOVBE__
169 #endif
170 #ifdef __POPCNT__
172 #endif
173 #ifdef __AES__
174  | CpuFeatureAES
175 #endif
176 #ifdef __AVX__
177  | CpuFeatureAVX
178 #endif
179 #ifdef __F16C__
181 #endif
182 #ifdef __RDRND__
184 #endif
185 #ifdef __BMI__
186  | CpuFeatureBMI
187 #endif
188 #ifdef __HLE__
189  | CpuFeatureHLE
190 #endif
191 #ifdef __AVX2__
193 #endif
194 #ifdef __BMI2__
196 #endif
197 #ifdef __RTM__
198  | CpuFeatureRTM
199 #endif
200 #ifdef __AVX512F__
202 #endif
203 #ifdef __AVX512DQ__
205 #endif
206 #ifdef __RDSEED__
208 #endif
209 #ifdef __AVX512IFMA__
211 #endif
212 #ifdef __AVX512PF__
214 #endif
215 #ifdef __AVX512ER__
217 #endif
218 #ifdef __AVX512CD__
220 #endif
221 #ifdef __SHA__
222  | CpuFeatureSHA
223 #endif
224 #ifdef __AVX512BW__
226 #endif
227 #ifdef __AVX512VL__
229 #endif
230 #ifdef __AVX512VBMI__
232 #endif
233 #ifdef __AVX512VBMI2__
235 #endif
236 #ifdef __GFNI__
238 #endif
239 #ifdef __VAES__
241 #endif
242 #ifdef __AVX512VNNI__
244 #endif
245 #ifdef __AVX512BITALG__
247 #endif
248 #ifdef __AVX512VPOPCNTDQ__
250 #endif
251 #ifdef __AVX5124NNIW__
253 #endif
254 #ifdef __AVX5124FMAPS__
256 #endif
257  ;
258 
260 
261 #endif // QSIMD_X86_P_H
unsigned long long quint64
Definition: qglobal.h:299
#define CpuFeatureF16C
Definition: qsimd_x86_p.h:89
#define CpuFeatureAVX512IFMA
Definition: qsimd_x86_p.h:111
#define CpuFeatureAVX512F
Definition: qsimd_x86_p.h:105
#define CpuFeatureAES
Definition: qsimd_x86_p.h:85
#define CpuFeatureHLE
Definition: qsimd_x86_p.h:97
#define CpuFeatureBMI
Definition: qsimd_x86_p.h:95
#define CpuFeatureBMI2
Definition: qsimd_x86_p.h:101
#define CpuFeatureMOVBE
Definition: qsimd_x86_p.h:81
#define CpuFeatureAVX512VL
Definition: qsimd_x86_p.h:123
#define CpuFeatureAVX2
Definition: qsimd_x86_p.h:99
#define CpuFeatureFMA
Definition: qsimd_x86_p.h:75
#define CpuFeatureSSSE3
Definition: qsimd_x86_p.h:73
#define CpuFeatureAVX5124FMAPS
Definition: qsimd_x86_p.h:145
#define CpuFeatureAVX512VBMI
Definition: qsimd_x86_p.h:127
#define CpuFeaturePOPCNT
Definition: qsimd_x86_p.h:83
#define CpuFeatureSSE4_1
Definition: qsimd_x86_p.h:77
#define CpuFeatureSSE2
Definition: qsimd_x86_p.h:67
#define CpuFeatureVAES
Definition: qsimd_x86_p.h:133
#define CpuFeatureAVX512VBMI2
Definition: qsimd_x86_p.h:129
#define CpuFeatureSSE3
Definition: qsimd_x86_p.h:71
#define CpuFeatureAVX512BW
Definition: qsimd_x86_p.h:121
#define CpuFeatureAVX
Definition: qsimd_x86_p.h:87
#define CpuFeatureRDSEED
Definition: qsimd_x86_p.h:109
#define CpuFeatureAVX512VPOPCNTDQ
Definition: qsimd_x86_p.h:139
#define CpuFeatureSSE4_2
Definition: qsimd_x86_p.h:79
#define CpuFeatureGFNI
Definition: qsimd_x86_p.h:131
#define CpuFeatureAVX512DQ
Definition: qsimd_x86_p.h:107
#define CpuFeatureAVX5124NNIW
Definition: qsimd_x86_p.h:143
#define CpuFeatureAVX512ER
Definition: qsimd_x86_p.h:115
#define CpuFeatureAVX512CD
Definition: qsimd_x86_p.h:117
#define CpuFeatureRTM
Definition: qsimd_x86_p.h:103
#define CpuFeatureRDRND
Definition: qsimd_x86_p.h:91
#define CpuFeatureAVX512PF
Definition: qsimd_x86_p.h:113
#define CpuFeatureSHA
Definition: qsimd_x86_p.h:119
#define CpuFeatureAVX512VNNI
Definition: qsimd_x86_p.h:135
#define CpuFeatureAVX512BITALG
Definition: qsimd_x86_p.h:137