D Programming Language 2.0

- Comments
- D
- Search
- Home

Last update Thu Jan 28 19:18:05 2010

# 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());
    }

BUGS:
Only works on x86 CPUs

License:
Boost License 1.0.

Authors:
Tomas Lindquist Olsen <tomas@famolsen.dk>

Copyright Tomas Lindquist Olsen 2007 - 2009. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at ) http:
//www.boost.org/LICENSE_1_0.txt

string toString();
  Returns everything as a printable string

string vendor();
  Returns vendor string

string 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

Copyright Tomas Lindquist Olsen 2007 - 2009. | Page generated by Ddoc.