Report a bug
If you spot a problem with this page, click here to create a GitHub issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
cpuid.unified
High level abstraction on top of all architectures.
This module is compatible with betterC compilation mode.
License:
Authors:
Ilya Yaroshenko
Examples:
void smallReport() { import cpuid.unified; import std.stdio: writefln; enum fmt = "%14s: %s"; fmt.writefln("cores", cores); fmt.writefln("threads", threads); fmt.writefln("data caches", dCache.length); fmt.writefln("code caches", iCache.length); fmt.writefln("unified caches", uCache.length); fmt.writefln("data TLBs", dTlb.length); fmt.writefln("code TLBs", iTlb.length); fmt.writefln("unified TLBs", uTlb.length); }
- export nothrow @nogc void
mir_cpuid_init
();
export aliascpuid_init
= mir_cpuid_init; - Initialize basic CPU information including basic architecture. It is safe to call this function multiple times. It calls appropriate basic initialization for each module (cpuid_x86_any_init for X86 machines).
- export pure nothrow @nogc @trusted uint
mir_cpuid_cpus
();
export aliascpus
= mir_cpuid_cpus; - Total number of CPU packages.
Note not implemented
- export pure nothrow @nogc @trusted uint
mir_cpuid_cores
();
export aliascores
= mir_cpuid_cores; - Total number of cores per CPU.
- export pure nothrow @nogc @trusted uint
mir_cpuid_threads
();
export aliasthreads
= mir_cpuid_threads; - Total number of threads per CPU.
- export pure nothrow @nogc @trusted immutable(Cache)[]
mir_cpuid_dCache
();
export aliasdCache
= mir_cpuid_dCache; - Data CachesReturns:Array composed of detected data caches. Array is sorted in ascending order.
- export pure nothrow @nogc @trusted immutable(Cache)[]
mir_cpuid_iCache
();
export aliasiCache
= mir_cpuid_iCache; - Instruction CachesReturns:Array composed of detected instruction caches. Array is sorted in ascending order.
- export pure nothrow @nogc @trusted immutable(Cache)[]
mir_cpuid_uCache
();
export aliasuCache
= mir_cpuid_uCache; - Unified CachesReturns:Array composed of detected unified caches. Array is sorted in ascending order.
- export pure nothrow @nogc @trusted immutable(Tlb)[]
mir_cpuid_dTlb
();
export aliasdTlb
= mir_cpuid_dTlb; - Data Translation Lookaside BuffersReturns:Array composed of detected data translation lookaside buffers. Array is sorted in ascending order.
- export pure nothrow @nogc @trusted immutable(Tlb)[]
mir_cpuid_iTlb
();
export aliasiTlb
= mir_cpuid_iTlb; - Instruction Translation Lookaside BuffersReturns:Array composed of detected instruction translation lookaside buffers. Array is sorted in ascending order.
- export pure nothrow @nogc @trusted immutable(Tlb)[]
mir_cpuid_uTlb
();
export aliasuTlb
= mir_cpuid_uTlb; - Unified Translation Lookaside BuffersReturns:Array composed of detected unified translation lookaside buffers. Array is sorted in ascending order.
Copyright © 2016-2020 by Ilya Yaroshenko | Page generated by
Ddoc on Sun Oct 4 11:50:09 2020