void main()
{
import std.stdio;
import cpuid.unified;
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);
}
This package also can be used as workaround for core.cpuid Issue 16028.
See all reports.
Run the following command from the project's directory to receive a report about your CPU
dub --single report.d
Please report dub log in a new GitHub issue!
See also output example.
BetterC mode works when compiled with LDC only.
dub build --compiler=ldmd2 --build-mode=singleFile --parallel
_cpuid
function is available for x86/x86-64 targets.mir.bitmanip.bitfields
are used instead of bit operations.extern(C)
insterface.