Jump to page: 1 24  
Page
Thread overview
cpuid wrapper
Oct 24, 2006
Kyle Furlong
Oct 24, 2006
Paolo Invernizzi
Oct 24, 2006
Don Clugston
Oct 24, 2006
Lutger
Oct 24, 2006
Chris Miller
Oct 24, 2006
nobody_
Oct 24, 2006
Tiberiu Gal
Oct 24, 2006
Walter Bright
Oct 24, 2006
clayasaurus
Oct 24, 2006
Andrey Khropov
Oct 24, 2006
Lars Ivar Igesund
Oct 24, 2006
Frits van Bommel
Oct 25, 2006
Carlos Santander
Oct 25, 2006
Chris Miller
Oct 25, 2006
Chris Miller
Oct 25, 2006
Tydr Schnubbis
Oct 25, 2006
notknown
Oct 25, 2006
notknown
Oct 25, 2006
notknown
Oct 25, 2006
notknown
Oct 26, 2006
notknown
October 24, 2006
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?
October 24, 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?

Very yes.
October 24, 2006
On my machine...

D:\Users\invernizzi\tmp>build test.d -exec
Vendor string:    GenuineIntel
Processor string:               Intel(R) Pentium(R) D CPU 3.00GHz
Features:         MMX SSE SSE2 SSE3 AMD64 HTT
Multithreading:   2 threads / 2 cores

---
Paolo Invernizzi

Tomas Lindquist Olsen wrote:

> 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.
October 24, 2006
Paolo Invernizzi wrote:
> On my machine...
> 
> D:\Users\invernizzi\tmp>build test.d -exec
> Vendor string:    GenuineIntel
> Processor string:               Intel(R) Pentium(R) D CPU 3.00GHz
> Features:         MMX SSE SSE2 SSE3 AMD64 HTT
> Multithreading:   2 threads / 2 cores
> 
> ---
> Paolo Invernizzi
> 
Hmm. Is that information correct? I thought all recent Pentium CPU's had two hardware threads per core.
October 24, 2006
Paolo Invernizzi wrote:
> On my machine...
> 
> D:\Users\invernizzi\tmp>build test.d -exec
> Vendor string:    GenuineIntel
> Processor string:               Intel(R) Pentium(R) D CPU 3.00GHz
> Features:         MMX SSE SSE2 SSE3 AMD64 HTT
> Multithreading:   2 threads / 2 cores

And here's a single-thread result:

>bud test.d -exec
Vendor string:    GenuineIntel
Processor string:         Intel(R) Pentium(R) M processor 1.86GHz
Features:         MMX SSE SSE2
Multithreading:   1 threads / 1 cores

> 
> ---
> Paolo Invernizzi
> 
> Tomas Lindquist Olsen wrote:
> 
>> 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?

Yes. But, make sure you're not just reinventing the wheel, since it's such a well-explored problem. I think it would make sense for D to come with a simple BLAS implementation for general use.

I just found one little BLAS1 implementation that's under a BSD license:

http://iridia.ulb.ac.be/~fvandenb/miniSSEL1BLAS/miniSSEL1BLAS.html

which looks as though it is D-compatible and easy to port. No doubt there are many others on the net.
October 24, 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?

Thank you and yes, of course.
October 24, 2006
On Tue, 24 Oct 2006 06:11:42 -0400, Tomas Lindquist Olsen <tomas@famolsen.dk> 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.
>

Cool! I was just thinking about detecting the CPU recently.


Vendor string:    GenuineIntel
Processor string:               Intel(R) Pentium(R) 4 CPU 2.66GHz
Features:         MMX SSE SSE2 HTT
Multithreading:   1 threads / 1 cores

HTT with 1 thread/core?
October 24, 2006
Vendor string:    GenuineIntel
Processor string:               Intel(R) Pentium(R) 4 CPU 2.80GHz
Features:         MMX SSE SSE2 HTT
Multithreading:   2 threads / 1 cores

>
> Vendor string:    GenuineIntel
> Processor string:               Intel(R) Pentium(R) 4 CPU 2.66GHz
> Features:         MMX SSE SSE2 HTT
> Multithreading:   1 threads / 1 cores
>
> HTT with 1 thread/core?

HTT can be disabled/enabled in bios, maybe you have it disabled?


October 24, 2006
On Tue, 24 Oct 2006 13:11:42 +0300, Tomas Lindquist Olsen <tomas@famolsen.dk> 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?

c:\>build test.d -exec
Vendor string:    AuthenticAMD
Processor string: AMD Athlon(tm) XP 2000+
Features:         MMX SSE 3DNow! 3DNow!+ MMX+
Multithreading:   1 threads / 1 cores

it works fine

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
October 24, 2006
Tomas Lindquist Olsen wrote:
> Get it here: http://famolsen.dk/d/cpuid.zip

I'd like to put this into Phobos. Can you explicitly make it public domain?
« First   ‹ Prev
1 2 3 4