www.digitalmars.com

D Programming Language 1.0

Last update Mon Dec 31 10:53:28 2012

std.cpuid

Identify the characteristics of the host CPU.

Implemented according to:

- AP-485 Intel(C) Processor Identification and the CPUID Instruction http://www.intel.com/design/xeon/applnots/241618.htm

- Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Volume 2A: Instruction Set Reference, A-M http://developer.intel.com/design/pentium4/manuals/index_new.htm

- AMD CPUID Specification Publication # 25481 http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25481.pdf

Example:
import std.cpuid;
import std.stdio;

void main()
{
    writefln(std.cpuid.toString());
}


Authors:
Tomas Lindquist Olsen <tomas@famolsen.dk> (slightly altered by Walter Bright)

BUGS:
Only works on x86 CPUs

Source:
std/cpuid.d

char[] toString();
Returns everything as a printable string

char[] vendor();
Returns vendor string

char[] processor();
Returns processor string

bool mmx();
Is MMX supported?

bool fxsr();
Is FXSR supported?

bool sse();
Is SSE supported?

bool sse2();
Is SSE2 supported?

bool sse3();
Is SSE3 supported?

bool ssse3();
Is SSSE3 supported?

bool amd3dnow();
Is AMD 3DNOW supported?

bool amd3dnowExt();
Is AMD 3DNOW Ext supported?

bool amdMmx();
Is AMD MMX supported?

bool ia64();
Is this an Intel Architecture IA64?

bool amd64();
Is this an AMD 64?

bool hyperThreading();
Is hyperthreading supported?

uint threadsPerCPU();
Returns number of threads per CPU

uint coresPerCPU();
Returns number of cores in CPU

bool intel();
Is this an Intel processor?

bool amd();
Is this an AMD processor?

uint stepping();
Returns stepping

uint model();
Returns model

uint family();
Returns family