cpuid wrapper

Lars Ivar Igesund larsivar at igesund.net
Tue Oct 24 14:16:48 PDT 2006


Tomas Lindquist Olsen wrote:

> Hi all,
> I've written a simple class that encapsulates the cpuid instruction. It
> could probably be improved and polished, but I'm fairly happy with it.
> 
> One thing I'm considering is if a static only class would be better,
> it's not like the info can change dynamically...
> 
> Get it here: http://famolsen.dk/d/cpuid.zip
> 
> The zip contains the cpuid module and a simple test app. Running the
> test app I get personally get this:
> 
> Vendor string:    AuthenticAMD
> Processor string: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
> Features:         MMX SSE SSE2 SSE3 3DNow! 3DNow!+ MMX+ AMD64 HTT
> Multithreading:   2 threads / 2 cores
> 
> The threading info should work on both Intel and AMD cpus, but I have no
> way to test the Intel path. Any feedback would be much appreciated.
> 
> Also, I'm considering creating a library with sse/2/3 optimised batch
> operations for vector operations normalisation etc. Would such a library
> be of interest to the D community?

larsivi at larsivi-laptop:~/code/d/cpuid$ ./test
Vendor string:    GenuineIntel
Processor string:         Intel(R) Pentium(R) M processor 1.86GHz
Features:         MMX SSE SSE2
Multithreading:   1 threads / 1 cores

Looks correct to me, the naming of the processor is Pentium-M 750 in the
computer spec.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource & #D: larsivi



More information about the Digitalmars-d-announce mailing list