cpuidpp 1.0.0
C++11 library for identifying CPU features
Loading...
Searching...
No Matches
cpuidpp.hpp
Go to the documentation of this file.
1
10#ifndef CPUIDPP_CPUIDPP_HPP
11#define CPUIDPP_CPUIDPP_HPP
12
13#if defined(_MSVC_LANG) && (_MSVC_LANG < 201402L)
14#error cpuidpp requires a C++11 compiler
15#endif // defined(_MSVC_LANG) && _MSVC_LANG <= 201103L
16
17#include <string>
18
19#include <cpuidpp/export.hpp>
20
21namespace cpuidpp {
22
24CPUIDPP_EXPORT bool acpi();
26CPUIDPP_EXPORT bool adx();
28CPUIDPP_EXPORT bool aes();
30CPUIDPP_EXPORT bool apic();
32CPUIDPP_EXPORT bool avx();
34CPUIDPP_EXPORT bool avx2();
36CPUIDPP_EXPORT bool avx512_4fmaps();
38CPUIDPP_EXPORT bool avx512_4vnniw();
40CPUIDPP_EXPORT bool avx512bw();
42CPUIDPP_EXPORT bool avx512cd();
44CPUIDPP_EXPORT bool avx512dq();
46CPUIDPP_EXPORT bool avx512er();
48CPUIDPP_EXPORT bool avx512f();
50CPUIDPP_EXPORT bool avx512ifma();
52CPUIDPP_EXPORT bool avx512pf();
54CPUIDPP_EXPORT bool avx512vbmi();
56CPUIDPP_EXPORT bool avx512vl();
58CPUIDPP_EXPORT bool avx512vpopcntdq();
60CPUIDPP_EXPORT bool bmi1();
62CPUIDPP_EXPORT bool bmi2();
64CPUIDPP_EXPORT bool clflushopt();
66CPUIDPP_EXPORT bool clfsh();
68CPUIDPP_EXPORT bool clwb();
70CPUIDPP_EXPORT bool cmov();
72CPUIDPP_EXPORT bool cnxt_id();
74CPUIDPP_EXPORT bool cx16();
76CPUIDPP_EXPORT bool cx8();
78CPUIDPP_EXPORT bool dbx();
80CPUIDPP_EXPORT bool dca();
82CPUIDPP_EXPORT bool de();
84CPUIDPP_EXPORT bool ds();
86CPUIDPP_EXPORT bool ds_cpl();
88CPUIDPP_EXPORT bool dtes64();
90CPUIDPP_EXPORT bool erms();
92CPUIDPP_EXPORT bool eist();
94CPUIDPP_EXPORT bool extapic();
96CPUIDPP_EXPORT bool f16c();
98CPUIDPP_EXPORT bool fma();
100CPUIDPP_EXPORT bool fpu();
102CPUIDPP_EXPORT bool fsgsbase();
104CPUIDPP_EXPORT bool fxsr();
106CPUIDPP_EXPORT bool fxsr_opt();
108CPUIDPP_EXPORT bool hle();
110CPUIDPP_EXPORT bool htt();
112CPUIDPP_EXPORT bool hypervisor();
114CPUIDPP_EXPORT bool ia64();
116CPUIDPP_EXPORT bool intel_pt();
118CPUIDPP_EXPORT bool invpcid();
120CPUIDPP_EXPORT bool lm();
122CPUIDPP_EXPORT bool mca();
124CPUIDPP_EXPORT bool mce();
126CPUIDPP_EXPORT bool mmx();
128CPUIDPP_EXPORT bool mmxext();
130CPUIDPP_EXPORT bool monitor();
132CPUIDPP_EXPORT bool movbe();
134CPUIDPP_EXPORT bool mp();
136CPUIDPP_EXPORT bool mpx();
138CPUIDPP_EXPORT bool msr();
140CPUIDPP_EXPORT bool mtrr();
142CPUIDPP_EXPORT bool nx();
144CPUIDPP_EXPORT bool ospke();
146CPUIDPP_EXPORT bool oxsave();
148CPUIDPP_EXPORT bool pae();
150CPUIDPP_EXPORT bool pat();
152CPUIDPP_EXPORT bool pbe();
154CPUIDPP_EXPORT bool pcid();
156CPUIDPP_EXPORT bool pclmulqdq();
158CPUIDPP_EXPORT bool pcommit();
160CPUIDPP_EXPORT bool pcx_l2i();
162CPUIDPP_EXPORT bool pdcm();
164CPUIDPP_EXPORT bool pdpe1gb();
166CPUIDPP_EXPORT bool perfctr_core();
168CPUIDPP_EXPORT bool perfctr_nb();
170CPUIDPP_EXPORT bool perftsc();
172CPUIDPP_EXPORT bool pge();
174CPUIDPP_EXPORT bool pku();
176CPUIDPP_EXPORT bool popcnt();
178CPUIDPP_EXPORT bool pqe();
180CPUIDPP_EXPORT bool pqm();
182CPUIDPP_EXPORT bool prefetchwt1();
184CPUIDPP_EXPORT bool pse();
186CPUIDPP_EXPORT bool pse36();
188CPUIDPP_EXPORT bool psn();
190CPUIDPP_EXPORT bool rdpid();
192CPUIDPP_EXPORT bool rdrnd();
194CPUIDPP_EXPORT bool rdseed();
196CPUIDPP_EXPORT bool rdtscp();
198CPUIDPP_EXPORT bool rtm();
200CPUIDPP_EXPORT bool sdbg();
202CPUIDPP_EXPORT bool sep();
204CPUIDPP_EXPORT bool sgx();
206CPUIDPP_EXPORT bool sgx_lc();
208CPUIDPP_EXPORT bool sha();
210CPUIDPP_EXPORT bool smap();
212CPUIDPP_EXPORT bool smep();
214CPUIDPP_EXPORT bool smx();
216CPUIDPP_EXPORT bool ss();
218CPUIDPP_EXPORT bool sse();
220CPUIDPP_EXPORT bool sse2();
222CPUIDPP_EXPORT bool sse3();
224CPUIDPP_EXPORT bool sse4_1();
226CPUIDPP_EXPORT bool sse4_2();
228CPUIDPP_EXPORT bool ssse3();
230CPUIDPP_EXPORT bool tm();
232CPUIDPP_EXPORT bool tm2();
234CPUIDPP_EXPORT bool tsc();
236CPUIDPP_EXPORT bool tsc_deadline();
238CPUIDPP_EXPORT bool umip();
240CPUIDPP_EXPORT bool vme();
242CPUIDPP_EXPORT bool vmx();
244CPUIDPP_EXPORT bool x2apic();
246CPUIDPP_EXPORT bool xsave();
248CPUIDPP_EXPORT bool xtpr();
250CPUIDPP_EXPORT const std::string& model();
251
280CPUIDPP_EXPORT const std::string& vendor();
281
289CPUIDPP_EXPORT bool abm();
291CPUIDPP_EXPORT bool amd_3dnow();
293CPUIDPP_EXPORT bool amd_3dnowext();
295CPUIDPP_EXPORT bool amd_3dnowprefetch();
297CPUIDPP_EXPORT bool cmp_legacy();
299CPUIDPP_EXPORT bool cr8_legacy();
301CPUIDPP_EXPORT bool ibs();
303CPUIDPP_EXPORT bool lahf_lm();
305CPUIDPP_EXPORT bool osvw();
307CPUIDPP_EXPORT bool misalignsse();
309CPUIDPP_EXPORT bool skinit();
311CPUIDPP_EXPORT bool syscall();
313CPUIDPP_EXPORT bool svm();
315CPUIDPP_EXPORT bool sse4a();
317CPUIDPP_EXPORT bool wdt();
319CPUIDPP_EXPORT bool xop();
321CPUIDPP_EXPORT bool lwp();
323CPUIDPP_EXPORT bool fma4();
325CPUIDPP_EXPORT bool tce();
327CPUIDPP_EXPORT bool nodeid_msr();
329CPUIDPP_EXPORT bool tbm();
331CPUIDPP_EXPORT bool topoext();
332
334
335} // namespace cpuidpp
336
337#endif // !defined(CPUIDPP_CPUIDPP_HPP)
Export declarations.
cpuidpp functions.
bool movbe()
Indicates whether the MOVBE instruction (big-endian) is supported.
bool smx()
Indicates whether Safer Mode Extensions are supported.
bool osvw()
Indicates whether OS Visible Workaround is active.
bool pse()
Indicates whether the Page Size Extension is supported.
bool monitor()
Indicates whether MONITOR and MWAIT instructions are supported.
bool xop()
Indicates whether XOP instruction set is supported.
bool tce()
Indicates whether Translation Cache Extension is supported.
bool adx()
Indicates whether Intel ADX (Multi-Precision Add-Carry Instruction Extensions) is supported.
bool pbe()
Indicates whether Pending Break Enable (PBE# pin) wakeup is supported.
bool sse2()
Indicates whether SSE2 instructions are supported.
bool ds()
Indicates whether Debug store: save trace of executed jumps are supported.
bool fma4()
Indicates whether 4 operands fused multiply-add is supported.
bool pdcm()
Indicates whether Perfmon and debug capability is supported.
bool lahf_lm()
Indicates whether LAHF/SAHF in long mode is supported.
bool vme()
Indicates whether virtual 8086 mode extensions (such as VIF, VIP, PIV) are supported.
bool fxsr_opt()
Indicates whether FXSAVE/FXRSTOR optimizations are supported.
bool clfsh()
Indicates whether the CLFLUSH instruction is supported.
bool avx()
Indicates whether Advanced Vector Extensions are supported.
bool cx16()
Indicates whether the CMPXCHG16B instruction is supported.
bool ssse3()
Indicates whether SSSE3 instructions are supported.
bool htt()
Indicates whether Hyper-threading is supported.
bool rdpid()
Indicates whether Read Processor ID is supported.
bool tsc()
Indicates whether the Time Stamp Counter is supported.
bool dbx()
Indicates whether Data breakpoint extensions are supported.
bool sgx()
Indicates whether Software Guard Extensions are supported.
bool lwp()
Indicates whether Light Weight Profiling is supported.
bool mpx()
Indicates whether Intel MPX (Memory Protection Extensions) is supported.
bool amd_3dnow()
Indicates whether 3DNow! is supported.
bool mp()
Indicates whether the system is multiprocessor capable.
bool avx512cd()
Indicates whether AVX-512 Conflict Detection Instructions are supported.
bool cmp_legacy()
Indicates whether Hyperthreading is not valid.
bool pat()
Indicates whether the Page Attribute Table is supported.
bool avx2()
Indicates whether Advanced Vector Extensions 2 are supported.
bool ibs()
Indicates whether Instruction Based Sampling is supported.
bool fpu()
Indicates whether onboard x87 FPU is supported.
bool aes()
Indicates whether the AES instruction set is supported.
bool amd_3dnowprefetch()
Indicates whether the PREFETCH and PREFETCHW instructions are supported.
bool pse36()
Indicates whether the 36-bit page size extension is supported.
bool hypervisor()
Indicates whether we are running on a hypervisor (always 0 on a real CPU, but also with some hypervis...
bool avx512_4vnniw()
Indicates whether AVX-512 Neural Network instructions are supported.
bool sgx_lc()
Indicates whether SGX Launch Configuration is supported.
bool eist()
Indicates whether Enhanced SpeedStep is supported.
bool avx512_4fmaps()
Indicates whether AVX-512 Multiply Accumulation Single precision is supported.
bool ss()
Indicates whether CPU cache supports self-snoop is supported.
bool avx512er()
Indicates whether AVX-512 Exponential and Reciprocal Instructions are supported.
bool tsc_deadline()
Indicates whether APIC supports one-shot operation using a TSC deadline value.
bool pcommit()
Indicates whether PCOMMIT instruction is supported.
bool perfctr_core()
Indicates whether Core performance counter extensions are supported.
bool tm()
Indicates whether Thermal monitor automatically limits temperature is supported.
bool tm2()
Indicates whether Thermal Monitor 2 is supported.
bool apic()
Indicates whether Onboard Advanced Programmable Interrupt Controller is supported.
bool rdseed()
Indicates whether the RDSEED instruction is supported.
bool cnxt_id()
Indicates whether L1 Context ID is supported.
const std::string & vendor()
Returns the vendor ID.
bool avx512dq()
Indicates whether AVX-512 Doubleword and Quadword Instructions are supported.
bool avx512bw()
Indicates whether AVX-512 Byte and Word instructions are supported.
bool pqm()
Indicates whether Platform Quality of Service Monitoring is supported.
bool pcx_l2i()
Indicates whether L2I perf counter extensions are supported.
bool intel_pt()
Indicates whether Intel Processor Trace is supported.
bool fma()
Indicates whether Fused multiply-add (FMA3) is supported.
bool clwb()
Indicates whether the CLWB instruction is supported.
bool cr8_legacy()
Indicates whether CR8 in 32-bit mode is supported.
bool hle()
Indicates whether Transactional Synchronization Extensions are supported.
bool avx512vl()
Indicates whether AVX-512 Vector Length Extensions are supported.
bool sse4_2()
Indicates whether SSE4.2 instructions are supported.
bool ospke()
Indicates whether PKU is enabled by OS.
bool mmxext()
Indicates whether Extended MMX is supported.
bool mca()
Indicates whether the Machine Check Architecture is supported.
bool ds_cpl()
Indicates whether CPL qualified debug store is supported.
bool pae()
Indicates whether Physical Address Extension is supported.
bool topoext()
Indicates whether Topology Extensions are supported.
bool fsgsbase()
Indicates whether access to base of fs and gs is supported.
bool sdbg()
Indicates whether Silicon Debug interface is supported.
bool nx()
Indicates whether NX bit is supported.
bool xtpr()
Indicates whether sending task priority messages can be disabled.
bool mce()
Indicates whether Machine Check Exception is supported.
bool popcnt()
Indicates whether the POPCNT instruction is supported.
bool misalignsse()
Indicates whether the Misaligned SSE mode is supported.
bool sse()
Indicates whether SSE instructions are supported.
bool avx512ifma()
Indicates whether AVX-512 Integer Fused Multiply-Add Instructions are supported.
bool sse4_1()
Indicates whether SSE4.1 instructions are supported.
bool pge()
Indicates whether the Page Global Enable bit in CR4 is supported.
bool vmx()
Indicates whether Virtual Machine eXtensions are supported.
bool rtm()
Indicates whether Transactional Synchronization Extensions are supported.
bool avx512vpopcntdq()
Indicates whether AVX-512 Vector Population Count D/Q are supported.
bool umip()
Indicates whether User-mode Instruction Prevention is supported.
bool pku()
Indicates whether Memory Protection Keys for User-mode pages is supported.
bool clflushopt()
Indicates whether the CLFLUSHOPT instruction is supported.
bool sse4a()
Indicates whether SSE4a instructions are supported.
bool smap()
Indicates whether Supervisor Mode Access Prevention is supported.
bool svm()
Secure Virtual Machine.
bool syscall()
Indicates whether SYSCALL and SYSRET instructions are supported.
bool xsave()
Indicates whether XSAVE, XRESTOR, XSETBV, XGETBV are supported.
bool abm()
Indicates whether Advanced bit manipulation (LZCNT and POPCNT) is supported.
bool mtrr()
Indicates whether Memory Type Range Registers are supported.
bool avx512f()
Indicates whether AVX-512 Foundation is supported.
bool x2apic()
Indicates whether x2APIC is supported.
bool psn()
Indicates whether the Processor Serial Number is supported.
bool extapic()
Indicates whether Extended APIC space is supported.
bool avx512vbmi()
Indicates whether AVX-512 Vector Bit Manipulation Instructions are supported.
bool pcid()
Indicates whether Process context identifiers (CR4 bit 17) are supported.
bool lm()
Indicates whether Long mode is active.
bool avx512pf()
Indicates whether AVX-512 Prefetch Instructions are supported.
bool acpi()
Indicates whether Onboard thermal control MSRs for ACPI is supported.
bool perfctr_nb()
Indicates whether NB performance counter extensions are supported.
bool amd_3dnowext()
Indicates whether Extended 3DNow! is supported.
bool fxsr()
Indicates whether FXSAVE, FXRESTOR instructions, CR4 bit 9 are supported.
bool sha()
Indicates whether Intel SHA extensions are supported.
bool ia64()
Indicates whether this is a IA64 processor emulating x86.
bool oxsave()
Indicates whether XSAVE is enabled by OS.
bool msr()
Indicates whether Model-specific registers are supported.
bool bmi1()
Indicates whether the Bit Manipulation Instruction Set 1 is supported.
bool cx8()
Indicates whether the CMPXCHG8 (compare-and-swap) instruction is supported.
bool rdtscp()
Indicates whether the RDTSCP instruction is supported.
const std::string & model()
Returns the model of the CPU.
bool dca()
Indicates whether Direct cache access for DMA writes is supported.
bool nodeid_msr()
Indicates whether NodeID MSR is supported.
bool prefetchwt1()
Indicates whether the PREFETCHWT1 instruction is supported.
bool pclmulqdq()
Indicates whether the PCLMULQDQ instruction is supported.
bool wdt()
Indicates whether the Watchdog timer is supported.
bool invpcid()
Indicates whether the INVPCID instruction is supported.
bool cmov()
Indicates whether the Conditional move and FCMOV instructions are supported.
bool smep()
Indicates whether Supervisor-Mode Execution Prevention is supported.
bool sse3()
Indicates whether SSE3 instructions are supported.
bool sep()
Indicates whether the SYSENTER and SYSEXIT instructions are supported.
bool f16c()
Indicates whether F16C (half-precision) FP is supported.
bool perftsc()
Indicates whether Performance TSC is supported.
bool de()
Indicates whether debugging extensions (CR4 bit 3) are supported.
bool dtes64()
Indicates whether 64-bit debug store (edx bit 21) is supported.
bool bmi2()
Indicates whether the Bit Manipulation Instruction Set 2 is supported.
bool pdpe1gb()
Indicates whether Gibibyte pages are supported.
bool rdrnd()
Indicates whether the RDRAND (on-chip random number generator) instruction is supported.
bool mmx()
Indicates whether MMX instructions are supported.
bool skinit()
Indicates whether SKINIT/STGI instructions are supported.
bool tbm()
Indicates whether Trailing Bit Manipulation is supported.
bool pqe()
Indicates whether Platform Quality of Service Enforcement is supported.
bool erms()
Indicates whether Enhanced REP MOVSB/STOSB is supported.