dplug.core.cpuid

This is a quick change of core.cpuid, to be usable in programs without a runtime.

Members

Functions

aes
bool aes()

Is AES supported

amd3dnow
bool amd3dnow()

Is AMD 3DNOW supported?

amd3dnowExt
bool amd3dnowExt()

Is AMD 3DNOW Ext supported?

amdMmx
bool amdMmx()

Are AMD extensions to MMX supported?

avx
bool avx()

Is AVX supported

avx2
bool avx2()

Is AVX2 supported

coresPerCPU
uint coresPerCPU()

Returns number of cores in CPU

dataCaches
const(CacheInfo)[5] dataCaches()

The data caches. If there are fewer than 5 physical caches levels, the remaining levels are set to size_t.max (== entire memory space)

fma
bool fma()

Is FMA supported

fp16c
bool fp16c()

Is FP16C supported

has3dnowPrefetch
bool has3dnowPrefetch()

Is 3DNow prefetch supported?

hasCmov
bool hasCmov()

Is cmov supported?

hasCmpxchg16b
bool hasCmpxchg16b()

Is cmpxchg8b supported?

hasCmpxchg8b
bool hasCmpxchg8b()

Is cmpxchg8b supported?

hasFxsr
bool hasFxsr()

Is fxsave/fxrstor supported?

hasLahfSahf
bool hasLahfSahf()

Are LAHF and SAHF supported in 64-bit mode?

hasLzcnt
bool hasLzcnt()

Is LZCNT supported?

hasPclmulqdq
bool hasPclmulqdq()

Is pclmulqdq supported

hasPopcnt
bool hasPopcnt()

Is POPCNT supported?

hasRdrand
bool hasRdrand()

Is rdrand supported

hasRdseed
bool hasRdseed()

Is rdseed supported

hasRdtsc
bool hasRdtsc()

Is rdtsc supported?

hasSha
bool hasSha()

Is SHA supported

hasSysEnterSysExit
bool hasSysEnterSysExit()

Is SYSENTER/SYSEXIT supported?

hasVpclmulqdq
bool hasVpclmulqdq()

Is vpclmulqdq supported

hle
bool hle()

Is HLE (hardware lock elision) supported

hyperThreading
bool hyperThreading()

Is hyperthreading supported?

isItanium
bool isItanium()

Is this an IA64 (Itanium) processor?

isX86_64
bool isX86_64()

Is this an Intel64 or AMD 64?

mmx
bool mmx()

Is MMX supported?

preferAthlon
bool preferAthlon()

Optimisation hints for assembly code. For forward compatibility, the CPU is compared against different microarchitectures. For 32-bit x86, comparisons are made against the Intel PPro/PII/PIII/PM family.

preferPentium1
bool preferPentium1()

Does this CPU perform better on Pentium I code than Pentium Pro code?

preferPentium4
bool preferPentium4()

Does this CPU perform better on Pentium4 code than PentiumPro..Core2 code?

processor
string processor()

Returns processor string, for display purposes only

rtm
bool rtm()

Is RTM (restricted transactional memory) supported

sse
bool sse()

Is SSE supported?

sse2
bool sse2()

Is SSE2 supported?

sse3
bool sse3()

Is SSE3 supported?

sse41
bool sse41()

Is SSE4.1 supported?

sse42
bool sse42()

Is SSE4.2 supported?

sse4a
bool sse4a()

Is SSE4a supported?

ssse3
bool ssse3()

Is SSSE3 supported?

threadsPerCPU
uint threadsPerCPU()

Returns number of threads per CPU

vaes
bool vaes()

Is VEX-Encoded AES supported

vendor
string vendor()

Returns vendor string, for display purposes only. Do NOT use this to determine features! Note that some CPUs have programmable vendorIDs.

x87onChip
bool x87onChip()

Does it have an x87 FPU on-chip?

Static functions

cacheLevels
uint cacheLevels()

The number of cache levels in the CPU.

initializeCpuid
void initializeCpuid()

Instead of a static this constructor, this

Static variables

datacache
CacheInfo[5] datacache;

Scheduled for deprecation. Please use dataCaches instead.

family
uint family;

Warning: This field will be turned into a property in a future release. Processor type (vendor-dependent). This should be visible ONLY for display purposes.

model
uint model;

Warning: This field will be turned into a property in a future release. Processor type (vendor-dependent). This should be visible ONLY for display purposes.

numCacheLevels
uint numCacheLevels;

This field has been deprecated. Please use cacheLevels instead.

stepping
uint stepping;

Warning: This field will be turned into a property in a future release. Processor type (vendor-dependent). This should be visible ONLY for display purposes.

Structs

CacheInfo
struct CacheInfo

Cache size and behaviour

Meta

Authors

Don Clugston, Tomas Lindquist Olsen <tomas@famolsen.dk>