Vc  1.3.2-dev
SIMD Vector Classes for C++
CpuId Class Reference

Detailed Description

This class is available for x86 / AMD64 systems to read and interpret information about the CPU's capabilities.

Before any of the getter functions may be called, the init() function must have been called. It will be called automatically, but for any function executing before main, you better call CpuId::init() first.

Vc users will most likely not need this class directly, but rely on the isImplementationSupported, bestImplementationSupported, extraInstructionsSupported, and currentImplementationSupported functions.

Definition at line 50 of file cpuid.h.

#include <Vc/cpuid.h>

Static Public Member Functions

static void init ()
 Reads the CPU capabilities and stores them for faster subsequent access. More...
 
static ushort cacheLineSize ()
 Return the cache line size in bits.
 
static ProcessorType processorType ()
 Return the ProcessorType.
 
static uint processorFamily ()
 Return the family number of the processor (vendor dependent).
 
static uint processorModel ()
 Return the model number of the processor (vendor dependent).
 
static uint logicalProcessors ()
 Return the number of logical processors.
 
static bool isAmd ()
 Return whether the CPU vendor is AMD.
 
static bool isIntel ()
 Return whether the CPU vendor is Intel.
 
static bool hasSse3 ()
 Return whether the CPU supports SSE3.
 
static bool hasPclmulqdq ()
 Return whether the CPU supports the PCLMULQDQ instruction.
 
static bool hasMonitor ()
 Return whether the CPU supports the MONITOR/MWAIT instructions.
 
static bool hasVmx ()
 Return whether the CPU supports the Virtual Machine Extensions.
 
static bool hasSmx ()
 Return whether the CPU supports the Safer Mode Extensions.
 
static bool hasEist ()
 Return whether the CPU supports the Enhanced Intel SpeedStep technology.
 
static bool hasTm2 ()
 Return whether the CPU supports Thermal Monitor 2.
 
static bool hasSsse3 ()
 Return whether the CPU supports SSSE3.
 
static bool hasFma ()
 Return whether the CPU supports FMA extensions using YMM state.
 
static bool hasCmpXchg16b ()
 Return whether the CPU supports CMPXCHG16B.
 
static bool hasPdcm ()
 Return whether the CPU supports the Perfmon and Debug Capability.
 
static bool hasDca ()
 Return whether the CPU supports Direct Cache Access: prefetch data from a memory mapped device.
 
static bool hasSse41 ()
 Return whether the CPU supports SSE 4.1.
 
static bool hasSse42 ()
 Return whether the CPU supports SSE 4.2.
 
static bool hasMovbe ()
 Return whether the CPU supports the MOVBE instruction.
 
static bool hasPopcnt ()
 Return whether the CPU supports the POPCNT instruction.
 
static bool hasAes ()
 Return whether the CPU supports the AESNI instructions.
 
static bool hasOsxsave ()
 Return whether the CPU and OS support the XSETBV/XGETBV instructions.
 
static bool hasAvx ()
 Return whether the CPU supports AVX.
 
static bool hasBmi1 ()
 Return whether the CPU supports BMI1.
 
static bool hasHle ()
 Return whether the CPU supports transactional synchronization extensions.
 
static bool hasAvx2 ()
 Return whether the CPU supports AVX2.
 
static bool hasBmi2 ()
 Return whether the CPU supports BMI2.
 
static bool hasRtm ()
 Return whether the CPU supports transactional synchronization extensions.
 
static bool hasAvx512f ()
 Return whether the CPU supports AVX512f.
 
static bool hasAvx512dq ()
 Return whether the CPU supports AVX512dq.
 
static bool hasAvx512ifma ()
 Return whether the CPU supports AVX512ifma.
 
static bool hasAvx512pf ()
 Return whether the CPU supports AVX512pf.
 
static bool hasAvx512er ()
 Return whether the CPU supports AVX512er.
 
static bool hasAvx512cd ()
 Return whether the CPU supports AVX512cd.
 
static bool hasAvx512bw ()
 Return whether the CPU supports AVX512bw.
 
static bool hasAvx512vl ()
 Return whether the CPU supports AVX512vl.
 
static bool hasAvx512vbmi ()
 Return whether the CPU supports AVX512vbmi.
 
static bool hasF16c ()
 Return whether the CPU supports 16-bit floating-point conversion instructions.
 
static bool hasRdrand ()
 Return whether the CPU supports the RDRAND instruction.
 
static bool hasFpu ()
 Return whether the CPU contains an x87 FPU.
 
static bool hasDe ()
 Return whether the CPU contains Debugging Extensions.
 
static bool hasPse ()
 Return whether the CPU contains Page Size Extensions.
 
static bool hasTsc ()
 Return whether the CPU supports the RDTSC instruction.
 
static bool hasMsr ()
 Return whether the CPU supports the Model Specific Registers instructions.
 
static bool hasPae ()
 Return whether the CPU supports the Physical Address Extension.
 
static bool hasCx8 ()
 Return whether the CPU supports the CMPXCHG8B instruction.
 
static bool hasMtrr ()
 Return whether the CPU supports Memory Type Range Registers.
 
static bool hasCmov ()
 Return whether the CPU supports CMOV instructions.
 
static bool hasClfsh ()
 Return whether the CPU supports the CLFLUSH instruction.
 
static bool hasAcpi ()
 Return whether the CPU supports ACPI.
 
static bool hasMmx ()
 Return whether the CPU supports MMX.
 
static bool hasSse ()
 Return whether the CPU supports SSE.
 
static bool hasSse2 ()
 Return whether the CPU supports SSE2.
 
static bool hasSse4a ()
 Return whether the CPU supports SSE4a.
 
static bool hasMisAlignSse ()
 Return whether the CPU supports misaligned SSE instructions.
 
static bool hasAmdPrefetch ()
 Return whether the CPU supports the AMD prefetchw instruction.
 
static bool hasXop ()
 Return whether the CPU supports the XOP instructions.
 
static bool hasFma4 ()
 Return whether the CPU supports the FMA4 instructions.
 
static bool hasRdtscp ()
 Return whether the CPU supports the RDTSCP instruction.
 
static uint L1Instruction ()
 Return the size of the L1 instruction cache.
 
static uint L1Data ()
 Return the size of the L1 data cache.
 
static uint L2Data ()
 Return the size of the L2 cache.
 
static uint L3Data ()
 Return the size of the L3 cache.
 

Member Function Documentation

static void init ( )
static

Reads the CPU capabilities and stores them for faster subsequent access.

Will be executed automatically before main, but not necessarily before other functions executing before main.


The documentation for this class was generated from the following file: