25#define cpu_feature_sse2 (UINT64_C(1) << 0)
28#define cpu_feature_sse3 (UINT64_C(1) << 1)
29#define cpu_feature_ssse3 (UINT64_C(1) << 2)
30#define cpu_feature_fma (UINT64_C(1) << 3)
31#define cpu_feature_sse4_1 (UINT64_C(1) << 4)
32#define cpu_feature_sse4_2 (UINT64_C(1) << 5)
33#define cpu_feature_movbe (UINT64_C(1) << 6)
34#define cpu_feature_popcnt (UINT64_C(1) << 7)
35#define cpu_feature_aes (UINT64_C(1) << 8)
36#define cpu_feature_avx (UINT64_C(1) << 9)
37#define cpu_feature_f16c (UINT64_C(1) << 10)
38#define cpu_feature_rdrnd (UINT64_C(1) << 11)
41#define cpu_feature_bmi (UINT64_C(1) << 12)
42#define cpu_feature_avx2 (UINT64_C(1) << 13)
43#define cpu_feature_bmi2 (UINT64_C(1) << 14)
44#define cpu_feature_avx512f (UINT64_C(1) << 15)
45#define cpu_feature_avx512dq (UINT64_C(1) << 16)
46#define cpu_feature_rdseed (UINT64_C(1) << 17)
47#define cpu_feature_avx512ifma (UINT64_C(1) << 18)
48#define cpu_feature_avx512cd (UINT64_C(1) << 19)
49#define cpu_feature_sha (UINT64_C(1) << 20)
50#define cpu_feature_avx512bw (UINT64_C(1) << 21)
51#define cpu_feature_avx512vl (UINT64_C(1) << 22)
54#define cpu_feature_avx512vbmi (UINT64_C(1) << 23)
55#define cpu_feature_waitpkg (UINT64_C(1) << 24)
56#define cpu_feature_avx512vbmi2 (UINT64_C(1) << 25)
57#define cpu_feature_shstk (UINT64_C(1) << 26)
58#define cpu_feature_gfni (UINT64_C(1) << 27)
59#define cpu_feature_vaes (UINT64_C(1) << 28)
60#define cpu_feature_avx512bitalg (UINT64_C(1) << 29)
61#define cpu_feature_avx512vpopcntdq (UINT64_C(1) << 30)
64#define cpu_feature_hybrid (UINT64_C(1) << 31)
65#define cpu_feature_ibt (UINT64_C(1) << 32)
66#define cpu_feature_avx512fp16 (UINT64_C(1) << 33)
69#define cpu_feature_raoint (UINT64_C(1) << 34)
70#define cpu_feature_cmpccxadd (UINT64_C(1) << 35)
71#define cpu_feature_avxifma (UINT64_C(1) << 36)
72#define cpu_feature_lam (UINT64_C(1) << 37)
75#define cpu_x86_64 (0 \
77#define cpu_core2 (cpu_x86_64 \
80#define cpu_nhm (cpu_core2 \
81 | cpu_feature_sse4_1 \
82 | cpu_feature_sse4_2 \
84#define cpu_wsm (cpu_nhm)
85#define cpu_snb (cpu_wsm \
87#define cpu_ivb (cpu_snb \
90#define cpu_hsw (cpu_ivb \
96#define cpu_bdw (cpu_hsw \
98#define cpu_bdx (cpu_bdw)
99#define cpu_skl (cpu_bdw)
100#define cpu_skx (cpu_skl \
101 | cpu_feature_avx512f \
102 | cpu_feature_avx512dq \
103 | cpu_feature_avx512cd \
104 | cpu_feature_avx512bw \
105 | cpu_feature_avx512vl)
106#define cpu_clx (cpu_skx)
107#define cpu_cpx (cpu_clx)
108#define cpu_plc (cpu_skx \
109 | cpu_feature_avx512ifma \
110 | cpu_feature_avx512vbmi)
111#define cpu_snc (cpu_plc \
112 | cpu_feature_avx512vbmi2 \
115 | cpu_feature_avx512bitalg \
116 | cpu_feature_avx512vpopcntdq)
117#define cpu_wlc (cpu_snc \
118 | cpu_feature_shstk \
120#define cpu_glc (cpu_wlc \
121 | cpu_feature_waitpkg)
122#define cpu_rpc (cpu_glc)
123#define cpu_rwc (cpu_rpc)
124#define cpu_slm (cpu_wsm \
125 | cpu_feature_rdrnd \
127#define cpu_glm (cpu_slm \
128 | cpu_feature_rdseed)
129#define cpu_tnt (cpu_glm \
131 | cpu_feature_waitpkg)
132#define cpu_grt (cpu_skl \
135 | cpu_feature_shstk \
137 | cpu_feature_waitpkg)
138#define cpu_cmt (cpu_grt \
139 | cpu_feature_cmpccxadd \
140 | cpu_feature_avxifma)
141#define cpu_cnl (cpu_plc)
142#define cpu_icl (cpu_snc)
143#define cpu_tgl (cpu_wlc)
144#define cpu_adl (cpu_grt)
145#define cpu_rpl (cpu_grt)
146#define cpu_mtl (cpu_cmt)
147#define cpu_arl (cpu_cmt)
148#define cpu_lnl (cpu_cmt)
149#define cpu_icx (cpu_snc)
150#define cpu_spr (cpu_glc)
151#define cpu_emr (cpu_spr)
152#define cpu_gnr (cpu_glc)
153#define cpu_srf (cpu_cmt \
154 | cpu_feature_cmpccxadd \
155 | cpu_feature_avxifma)
156#define cpu_grr (cpu_srf \
157 | cpu_feature_raoint)
158#define cpu_cwf (cpu_srf)
159#define cpu_nehalem (cpu_nhm)
160#define cpu_westmere (cpu_wsm)
161#define cpu_sandybridge (cpu_snb)
162#define cpu_ivybridge (cpu_ivb)
163#define cpu_haswell (cpu_hsw)
164#define cpu_broadwell (cpu_bdw)
165#define cpu_skylake (cpu_skl)
166#define cpu_skylake_avx512 (cpu_skx)
167#define cpu_cascadelake (cpu_clx)
168#define cpu_cooperlake (cpu_cpx)
169#define cpu_palmcove (cpu_plc)
170#define cpu_cannonlake (cpu_cnl)
171#define cpu_sunnycove (cpu_snc)
172#define cpu_icelake_client (cpu_icl)
173#define cpu_icelake_server (cpu_icx)
174#define cpu_willowcove (cpu_wlc)
175#define cpu_tigerlake (cpu_tgl)
176#define cpu_goldencove (cpu_glc)
177#define cpu_alderlake (cpu_adl)
178#define cpu_raptorcove (cpu_rpc)
179#define cpu_raptorlake (cpu_rpl)
180#define cpu_redwoodcove (cpu_rwc)
181#define cpu_meteorlake (cpu_mtl)
182#define cpu_arrowlake (cpu_arl)
183#define cpu_lunarlake (cpu_lnl)
184#define cpu_sapphirerapids (cpu_spr)
185#define cpu_emeraldrapids (cpu_emr)
186#define cpu_graniterapids (cpu_gnr)
187#define cpu_silvermont (cpu_slm)
188#define cpu_goldmont (cpu_glm)
189#define cpu_tremont (cpu_tnt)
190#define cpu_gracemont (cpu_grt)
191#define cpu_crestmont (cpu_cmt)
192#define cpu_grandridge (cpu_grr)
193#define cpu_sierraforest (cpu_srf)
194#define cpu_clearwaterforest (cpu_cwf)
197#define QT_FUNCTION_TARGET_STRING_SSE2 "sse2"
198#define QT_FUNCTION_TARGET_STRING_SSE3 "sse3"
199#define QT_FUNCTION_TARGET_STRING_SSSE3 "ssse3"
200#define QT_FUNCTION_TARGET_STRING_FMA "fma"
201#define QT_FUNCTION_TARGET_STRING_SSE4_1 "sse4.1"
202#define QT_FUNCTION_TARGET_STRING_SSE4_2 "sse4.2"
203#define QT_FUNCTION_TARGET_STRING_MOVBE "movbe"
204#define QT_FUNCTION_TARGET_STRING_POPCNT "popcnt"
205#define QT_FUNCTION_TARGET_STRING_AES "aes,sse4.2"
206#define QT_FUNCTION_TARGET_STRING_AVX "avx"
207#define QT_FUNCTION_TARGET_STRING_F16C "f16c,avx"
208#define QT_FUNCTION_TARGET_STRING_RDRND "rdrnd"
209#define QT_FUNCTION_TARGET_STRING_BMI "bmi"
210#define QT_FUNCTION_TARGET_STRING_AVX2 "avx2,avx"
211#define QT_FUNCTION_TARGET_STRING_BMI2 "bmi2"
212#define QT_FUNCTION_TARGET_STRING_AVX512F "avx512f,avx"
213#define QT_FUNCTION_TARGET_STRING_AVX512DQ "avx512dq,avx512f"
214#define QT_FUNCTION_TARGET_STRING_RDSEED "rdseed"
215#define QT_FUNCTION_TARGET_STRING_AVX512IFMA "avx512ifma,avx512f"
216#define QT_FUNCTION_TARGET_STRING_AVX512CD "avx512cd,avx512f"
217#define QT_FUNCTION_TARGET_STRING_SHA "sha"
218#define QT_FUNCTION_TARGET_STRING_AVX512BW "avx512bw,avx512f"
219#define QT_FUNCTION_TARGET_STRING_AVX512VL "avx512vl,avx512f"
220#define QT_FUNCTION_TARGET_STRING_AVX512VBMI "avx512vbmi,avx512f"
221#define QT_FUNCTION_TARGET_STRING_WAITPKG "waitpkg"
222#define QT_FUNCTION_TARGET_STRING_AVX512VBMI2 "avx512vbmi2,avx512f"
223#define QT_FUNCTION_TARGET_STRING_SHSTK "shstk"
224#define QT_FUNCTION_TARGET_STRING_GFNI "gfni"
225#define QT_FUNCTION_TARGET_STRING_VAES "vaes,avx2,avx,aes"
226#define QT_FUNCTION_TARGET_STRING_AVX512BITALG "avx512bitalg,avx512f"
227#define QT_FUNCTION_TARGET_STRING_AVX512VPOPCNTDQ "avx512vpopcntdq,avx512f"
228#define QT_FUNCTION_TARGET_STRING_HYBRID "hybrid"
229#define QT_FUNCTION_TARGET_STRING_IBT "ibt"
230#define QT_FUNCTION_TARGET_STRING_AVX512FP16 "avx512fp16,avx512f,f16c"
231#define QT_FUNCTION_TARGET_STRING_RAOINT "raoint"
232#define QT_FUNCTION_TARGET_STRING_CMPCCXADD "cmpccxadd"
233#define QT_FUNCTION_TARGET_STRING_AVXIFMA "avxifma,avx"
234#define QT_FUNCTION_TARGET_STRING_LAM "lam"
235#define QT_FUNCTION_TARGET_STRING_ARCH_X86_64 "sse2"
236#define QT_FUNCTION_TARGET_STRING_ARCH_CORE2 QT_FUNCTION_TARGET_STRING_ARCH_X86_64 ",sse3,ssse3,cx16"
237#define QT_FUNCTION_TARGET_STRING_ARCH_NHM QT_FUNCTION_TARGET_STRING_ARCH_CORE2 ",sse4.1,sse4.2,popcnt"
238#define QT_FUNCTION_TARGET_STRING_ARCH_WSM QT_FUNCTION_TARGET_STRING_ARCH_NHM
239#define QT_FUNCTION_TARGET_STRING_ARCH_SNB QT_FUNCTION_TARGET_STRING_ARCH_WSM ",avx"
240#define QT_FUNCTION_TARGET_STRING_ARCH_IVB QT_FUNCTION_TARGET_STRING_ARCH_SNB ",f16c,rdrnd,fsgsbase"
241#define QT_FUNCTION_TARGET_STRING_ARCH_HSW QT_FUNCTION_TARGET_STRING_ARCH_IVB ",avx2,fma,bmi,bmi2,lzcnt,movbe"
242#define QT_FUNCTION_TARGET_STRING_ARCH_BDW QT_FUNCTION_TARGET_STRING_ARCH_HSW ",adx,rdseed"
243#define QT_FUNCTION_TARGET_STRING_ARCH_BDX QT_FUNCTION_TARGET_STRING_ARCH_BDW
244#define QT_FUNCTION_TARGET_STRING_ARCH_SKL QT_FUNCTION_TARGET_STRING_ARCH_BDW ",xsavec,xsaves"
245#define QT_FUNCTION_TARGET_STRING_ARCH_SKX QT_FUNCTION_TARGET_STRING_ARCH_SKL ",avx512f,avx512dq,avx512cd,avx512bw,avx512vl"
246#define QT_FUNCTION_TARGET_STRING_ARCH_CLX QT_FUNCTION_TARGET_STRING_ARCH_SKX ",avx512vnni"
247#define QT_FUNCTION_TARGET_STRING_ARCH_CPX QT_FUNCTION_TARGET_STRING_ARCH_CLX ",avx512bf16"
248#define QT_FUNCTION_TARGET_STRING_ARCH_PLC QT_FUNCTION_TARGET_STRING_ARCH_SKX ",avx512ifma,avx512vbmi"
249#define QT_FUNCTION_TARGET_STRING_ARCH_SNC QT_FUNCTION_TARGET_STRING_ARCH_PLC ",avx512vbmi2,gfni,vaes,vpclmulqdq,avx512vnni,avx512bitalg,avx512vpopcntdq"
250#define QT_FUNCTION_TARGET_STRING_ARCH_WLC QT_FUNCTION_TARGET_STRING_ARCH_SNC ",shstk,movdiri,movdir64b,ibt,keylocker"
251#define QT_FUNCTION_TARGET_STRING_ARCH_GLC QT_FUNCTION_TARGET_STRING_ARCH_WLC ",avx512bf16,avxvnni,cldemote,waitpkg,serialize,uintr"
252#define QT_FUNCTION_TARGET_STRING_ARCH_RPC QT_FUNCTION_TARGET_STRING_ARCH_GLC
253#define QT_FUNCTION_TARGET_STRING_ARCH_RWC QT_FUNCTION_TARGET_STRING_ARCH_RPC ",prefetchiti"
254#define QT_FUNCTION_TARGET_STRING_ARCH_SLM QT_FUNCTION_TARGET_STRING_ARCH_WSM ",rdrnd,movbe"
255#define QT_FUNCTION_TARGET_STRING_ARCH_GLM QT_FUNCTION_TARGET_STRING_ARCH_SLM ",fsgsbase,rdseed,lzcnt,xsavec,xsaves"
256#define QT_FUNCTION_TARGET_STRING_ARCH_TNT QT_FUNCTION_TARGET_STRING_ARCH_GLM ",clwb,gfni,cldemote,waitpkg,movdiri,movdir64b"
257#define QT_FUNCTION_TARGET_STRING_ARCH_GRT QT_FUNCTION_TARGET_STRING_ARCH_SKL ",avxvnni,gfni,vaes,vpclmulqdq,serialize,shstk,cldemote,movdiri,movdir64b,ibt,waitpkg,keylocker"
258#define QT_FUNCTION_TARGET_STRING_ARCH_CMT QT_FUNCTION_TARGET_STRING_ARCH_GRT ",cmpccxadd,avxifma,avxneconvert,avxvnniint8"
259#define QT_FUNCTION_TARGET_STRING_ARCH_CNL QT_FUNCTION_TARGET_STRING_ARCH_PLC
260#define QT_FUNCTION_TARGET_STRING_ARCH_ICL QT_FUNCTION_TARGET_STRING_ARCH_SNC
261#define QT_FUNCTION_TARGET_STRING_ARCH_TGL QT_FUNCTION_TARGET_STRING_ARCH_WLC
262#define QT_FUNCTION_TARGET_STRING_ARCH_ADL QT_FUNCTION_TARGET_STRING_ARCH_GRT
263#define QT_FUNCTION_TARGET_STRING_ARCH_RPL QT_FUNCTION_TARGET_STRING_ARCH_GRT
264#define QT_FUNCTION_TARGET_STRING_ARCH_MTL QT_FUNCTION_TARGET_STRING_ARCH_CMT
265#define QT_FUNCTION_TARGET_STRING_ARCH_ARL QT_FUNCTION_TARGET_STRING_ARCH_CMT
266#define QT_FUNCTION_TARGET_STRING_ARCH_LNL QT_FUNCTION_TARGET_STRING_ARCH_CMT
267#define QT_FUNCTION_TARGET_STRING_ARCH_ICX QT_FUNCTION_TARGET_STRING_ARCH_SNC ",pconfig"
268#define QT_FUNCTION_TARGET_STRING_ARCH_SPR QT_FUNCTION_TARGET_STRING_ARCH_GLC ",pconfig,amx-tile,amx-bf16,amx-int8"
269#define QT_FUNCTION_TARGET_STRING_ARCH_EMR QT_FUNCTION_TARGET_STRING_ARCH_SPR
270#define QT_FUNCTION_TARGET_STRING_ARCH_GNR QT_FUNCTION_TARGET_STRING_ARCH_GLC ",pconfig,amx-tile,amx-bf16,amx-int8,amx-fp16,amx-complex"
271#define QT_FUNCTION_TARGET_STRING_ARCH_SRF QT_FUNCTION_TARGET_STRING_ARCH_CMT ",cmpccxadd,avxifma,avxneconvert,avxvnniint8"
272#define QT_FUNCTION_TARGET_STRING_ARCH_GRR QT_FUNCTION_TARGET_STRING_ARCH_SRF ",raoint"
273#define QT_FUNCTION_TARGET_STRING_ARCH_CWF QT_FUNCTION_TARGET_STRING_ARCH_SRF
274#define QT_FUNCTION_TARGET_STRING_ARCH_NEHALEM QT_FUNCTION_TARGET_STRING_ARCH_NHM
275#define QT_FUNCTION_TARGET_STRING_ARCH_WESTMERE QT_FUNCTION_TARGET_STRING_ARCH_WSM
276#define QT_FUNCTION_TARGET_STRING_ARCH_SANDYBRIDGE QT_FUNCTION_TARGET_STRING_ARCH_SNB
277#define QT_FUNCTION_TARGET_STRING_ARCH_IVYBRIDGE QT_FUNCTION_TARGET_STRING_ARCH_IVB
278#define QT_FUNCTION_TARGET_STRING_ARCH_HASWELL QT_FUNCTION_TARGET_STRING_ARCH_HSW
279#define QT_FUNCTION_TARGET_STRING_ARCH_BROADWELL QT_FUNCTION_TARGET_STRING_ARCH_BDW
280#define QT_FUNCTION_TARGET_STRING_ARCH_SKYLAKE QT_FUNCTION_TARGET_STRING_ARCH_SKL
281#define QT_FUNCTION_TARGET_STRING_ARCH_SKYLAKE_AVX512 QT_FUNCTION_TARGET_STRING_ARCH_SKX
282#define QT_FUNCTION_TARGET_STRING_ARCH_CASCADELAKE QT_FUNCTION_TARGET_STRING_ARCH_CLX
283#define QT_FUNCTION_TARGET_STRING_ARCH_COOPERLAKE QT_FUNCTION_TARGET_STRING_ARCH_CPX
284#define QT_FUNCTION_TARGET_STRING_ARCH_PALMCOVE QT_FUNCTION_TARGET_STRING_ARCH_PLC
285#define QT_FUNCTION_TARGET_STRING_ARCH_CANNONLAKE QT_FUNCTION_TARGET_STRING_ARCH_CNL
286#define QT_FUNCTION_TARGET_STRING_ARCH_SUNNYCOVE QT_FUNCTION_TARGET_STRING_ARCH_SNC
287#define QT_FUNCTION_TARGET_STRING_ARCH_ICELAKE_CLIENT QT_FUNCTION_TARGET_STRING_ARCH_ICL
288#define QT_FUNCTION_TARGET_STRING_ARCH_ICELAKE_SERVER QT_FUNCTION_TARGET_STRING_ARCH_ICX
289#define QT_FUNCTION_TARGET_STRING_ARCH_WILLOWCOVE QT_FUNCTION_TARGET_STRING_ARCH_WLC
290#define QT_FUNCTION_TARGET_STRING_ARCH_TIGERLAKE QT_FUNCTION_TARGET_STRING_ARCH_TGL
291#define QT_FUNCTION_TARGET_STRING_ARCH_GOLDENCOVE QT_FUNCTION_TARGET_STRING_ARCH_GLC
292#define QT_FUNCTION_TARGET_STRING_ARCH_ALDERLAKE QT_FUNCTION_TARGET_STRING_ARCH_ADL
293#define QT_FUNCTION_TARGET_STRING_ARCH_RAPTORCOVE QT_FUNCTION_TARGET_STRING_ARCH_RPC
294#define QT_FUNCTION_TARGET_STRING_ARCH_RAPTORLAKE QT_FUNCTION_TARGET_STRING_ARCH_RPL
295#define QT_FUNCTION_TARGET_STRING_ARCH_REDWOODCOVE QT_FUNCTION_TARGET_STRING_ARCH_RWC
296#define QT_FUNCTION_TARGET_STRING_ARCH_METEORLAKE QT_FUNCTION_TARGET_STRING_ARCH_MTL
297#define QT_FUNCTION_TARGET_STRING_ARCH_ARROWLAKE QT_FUNCTION_TARGET_STRING_ARCH_ARL
298#define QT_FUNCTION_TARGET_STRING_ARCH_LUNARLAKE QT_FUNCTION_TARGET_STRING_ARCH_LNL
299#define QT_FUNCTION_TARGET_STRING_ARCH_SAPPHIRERAPIDS QT_FUNCTION_TARGET_STRING_ARCH_SPR
300#define QT_FUNCTION_TARGET_STRING_ARCH_EMERALDRAPIDS QT_FUNCTION_TARGET_STRING_ARCH_EMR
301#define QT_FUNCTION_TARGET_STRING_ARCH_GRANITERAPIDS QT_FUNCTION_TARGET_STRING_ARCH_GNR
302#define QT_FUNCTION_TARGET_STRING_ARCH_SILVERMONT QT_FUNCTION_TARGET_STRING_ARCH_SLM
303#define QT_FUNCTION_TARGET_STRING_ARCH_GOLDMONT QT_FUNCTION_TARGET_STRING_ARCH_GLM
304#define QT_FUNCTION_TARGET_STRING_ARCH_TREMONT QT_FUNCTION_TARGET_STRING_ARCH_TNT
305#define QT_FUNCTION_TARGET_STRING_ARCH_GRACEMONT QT_FUNCTION_TARGET_STRING_ARCH_GRT
306#define QT_FUNCTION_TARGET_STRING_ARCH_CRESTMONT QT_FUNCTION_TARGET_STRING_ARCH_CMT
307#define QT_FUNCTION_TARGET_STRING_ARCH_GRANDRIDGE QT_FUNCTION_TARGET_STRING_ARCH_GRR
308#define QT_FUNCTION_TARGET_STRING_ARCH_SIERRAFOREST QT_FUNCTION_TARGET_STRING_ARCH_SRF
309#define QT_FUNCTION_TARGET_STRING_ARCH_CLEARWATERFOREST QT_FUNCTION_TARGET_STRING_ARCH_CWF
387#ifdef __AVX512VBMI2__
399#ifdef __AVX512BITALG__
402#ifdef __AVX512VPOPCNTDQ__
428#if (defined __cplusplus) && __cplusplus >= 201103L
429enum X86CpuFeatures : uint64_t {
470enum X86CpuArchitectures : uint64_t {
#define cpu_feature_rdrnd
static const uint64_t _compilerCpuFeatures
#define cpu_feature_waitpkg
#define cpu_feature_sse4_2
#define cpu_feature_shstk
#define cpu_feature_ssse3
#define cpu_icelake_server
#define cpu_feature_avx512ifma
#define cpu_feature_avx512vpopcntdq
#define cpu_graniterapids
#define cpu_feature_avx512f
#define cpu_clearwaterforest
#define cpu_icelake_client
#define cpu_feature_avx512vl
#define cpu_feature_cmpccxadd
#define cpu_feature_rdseed
#define cpu_feature_avx512bitalg
#define cpu_feature_avx512dq
#define cpu_emeraldrapids
#define cpu_feature_raoint
#define cpu_feature_avx512vbmi2
#define cpu_skylake_avx512
#define cpu_feature_avx512fp16
#define cpu_feature_avxifma
#define cpu_feature_avx512bw
#define cpu_feature_sse4_1
#define cpu_feature_hybrid
#define cpu_feature_popcnt
#define cpu_feature_movbe
#define cpu_feature_avx512vbmi
#define cpu_feature_avx512cd
#define cpu_sapphirerapids