digitalmars.D.announce - cpuid wrapper
- Tomas Lindquist Olsen (17/17) Oct 24 2006 Hi all,
- Kyle Furlong (2/25) Oct 24 2006 Very yes.
- Paolo Invernizzi (9/16) Oct 24 2006 On my machine...
- Tomas Lindquist Olsen (3/14) Oct 24 2006 Hmm. Is that information correct? I thought all recent Pentium CPU's had...
- Don Clugston (13/37) Oct 24 2006 Vendor string: GenuineIntel
- Lutger (2/25) Oct 24 2006 Thank you and yes, of course.
- Chris Miller (8/11) Oct 24 2006 Cool! I was just thinking about detecting the CPU recently.
- nobody_ (5/10) Oct 24 2006 Vendor string: GenuineIntel
- Tiberiu Gal (10/27) Oct 24 2006 c:\>build test.d -exec
- Walter Bright (2/3) Oct 24 2006 I'd like to put this into Phobos. Can you explicitly make it public doma...
- Tomas Lindquist Olsen (8/9) Oct 24 2006 Cool :) I have updated the zip and CPUID is now public domain. There is
- clayasaurus (8/31) Oct 24 2006 I got...
- Andrey Khropov (6/8) Oct 24 2006 Who knows... Maybe one day D will be used in a multi-processor system wi...
- Lars Ivar Igesund (12/35) Oct 24 2006 larsivi@larsivi-laptop:~/code/d/cpuid$ ./test
- Frits van Bommel (23/44) Oct 24 2006 Maybe even just a module with some functions? (with recommendation to
- Tomas Lindquist Olsen (6/6) Oct 24 2006 The zip has been updated:
- Carlos Santander (4/11) Oct 24 2006 I have one: support other processors ;)
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (20/24) Oct 25 2006 Here is something that supports Mac OS X (Darwin):
- Tomas Lindquist Olsen (3/3) Oct 25 2006 Did another update with bunch of fixes. I took the time to read the
- Chris Miller (8/11) Oct 25 2006 Vendor string: GenuineIntel
- Tomas Lindquist Olsen (3/17) Oct 25 2006 aiii. I messed it up :(
- Chris Miller (10/25) Oct 25 2006 =
- Tydr Schnubbis (7/10) Oct 24 2006 Doesn't quite work for me, says '0 threads / 0 cores'. I have an Athlon...
- notknown (5/5) Oct 25 2006 Vendor string: AuthenticAMD
- Tomas Lindquist Olsen (6/13) Oct 25 2006 Weird indeed. The thread and core fields are initialised to one, and
- notknown (26/40) Oct 25 2006 Okay,
- Tomas Lindquist Olsen (4/50) Oct 25 2006 This seems like a compiler bug. It's declared:
- notknown (3/54) Oct 25 2006 Could it be because you run the code from constructor?
- notknown (2/9) Oct 25 2006 Okay, must be compiler bug, just checked and it is not touched anywhere
- Tomas Lindquist Olsen (4/14) Oct 25 2006 Do you think you could narrow this down? Seems it's not happening for
- notknown (4/20) Oct 26 2006 Okay,
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?
Oct 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.
Oct 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.
Oct 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 InvernizziHmm. Is that information correct? I thought all recent Pentium CPU's had two hardware threads per core.
Oct 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 coresAnd here's a single-thread result:bud test.d -execVendor 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.
Oct 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.
Oct 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?
Oct 24 2006
Vendor string: GenuineIntel Processor string: Intel(R) Pentium(R) 4 CPU 2.80GHz Features: MMX SSE SSE2 HTT Multithreading: 2 threads / 1 coresVendor 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?
Oct 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/
Oct 24 2006
Tomas Lindquist Olsen wrote:Get it here: http://famolsen.dk/d/cpuid.zipI'd like to put this into Phobos. Can you explicitly make it public domain?
Oct 24 2006
Walter Bright wrote:I'd like to put this into Phobos. Can you explicitly make it public domain?Cool :) I have updated the zip and CPUID is now public domain. There is one more thing (at least) that should be implemented though before this is really worthy of being in std (IMHO). The threading info is only probing the hardware. The OS might not allow the app to use those resources so processor affinity stuff should be added. I can add this, just have to read up on it. Or if someone knows it already feel free to patch, in which case I will do nothing :P
Oct 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?I got... Vendor string: GenuineIntel Processor string: Genuine Intel(R) CPU T2300 1.66GHz Features: MMX SSE SSE2 SSE3 HTT Multithreading: 2 threads / 2 cores Seems to work. ~ Clay
Oct 24 2006
Tomas Lindquist Olsen wrote:One thing I'm considering is if a static only class would be better, it's not like the info can change dynamically...Who knows... Maybe one day D will be used in a multi-processor system with Hot-Swapped CPUs. But anyway your code makes a nice contribution to D codebase. -- 'non-optimal' is a politically correct term for s*it
Oct 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?larsivi 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
Oct 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...Maybe even just a module with some functions? (with recommendation to use static import)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.After a small patch: char[12] vendorStr = ' '; char[48] processorStr = ' '; (Otherwise it crashes with an "invalid UTF string" exception) it returned this: Vendor string: GenuineIntel Processor string: Features: MMX SSE Multithreading: 1 threads / 1 cores on my laptop, which looks about right. Guess my laptop is so old it doesn't have a processor string. Well, either that or your code's buggy :P. (It's a Celeron according to the sticker, and about 750 MHz IIRC) Other computer: Vendor string: AuthenticAMD Processor string: AMD Sempron(tm) 2600+ Features: MMX SSE 3DNow! 3DNow!+ MMX+ Multithreading: 1 threads / 1 cores also looks right.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?Not useful to me personally but the more D code is out there, the better :).
Oct 24 2006
The zip has been updated: * Added public domain header * Fixed bug with manufacturer not being set if HTT was not supported * Fixed invalid processor string bugs It seems that there is actually some interest in this module so I will accept feature requests.
Oct 24 2006
Tomas Lindquist Olsen escribió:The zip has been updated: * Added public domain header * Fixed bug with manufacturer not being set if HTT was not supported * Fixed invalid processor string bugs It seems that there is actually some interest in this module so I will accept feature requests.I have one: support other processors ;) -- Carlos Santander Bernal
Oct 24 2006
Carlos Santander wrote:Here is something that supports Mac OS X (Darwin): http://www.algonet.se/~afb/d/cpuinfo.zip Name: ppc7450 CPU Type: CPU_TYPE_POWERPC CPU Subtype: CPU_SUBTYPE_POWERPC_7450 Description: PowerPC 7450 Vector Unit: true Name: i486 CPU Type: CPU_TYPE_I386 CPU Subtype: CPU_SUBTYPE_486 Description: Intel 80486 Vector Unit: true It's not public domain but copyrighted*, though... But sysctl(3) should be all that a "cpuid" needs ? Maybe that can be used to write a portable version: hw.cpufrequency: 800000000 hw.optional.altivec: 1 --anders * Since it needs to use the Mac OS X system headers.It seems that there is actually some interest in this module so I will accept feature requests.I have one: support other processors ;)
Oct 25 2006
Did another update with bunch of fixes. I took the time to read the official cpuid specs from intel and amd and I was not doing it 100% correctly.
Oct 25 2006
On Wed, 25 Oct 2006 05:13:08 -0400, Tomas Lindquist Olsen = <tomas famolsen.dk> wrote:Did another update with bunch of fixes. I took the time to read the =official cpuid specs from intel and amd and I was not doing it 100% =correctly.Vendor string: GenuineIntel Processor string: Intel(R) Pentium(R) 4 CPU 2.66GHz Signature: Family=3D15 Model=3D2 Stepping=3D7 Features: MMX FXSR SSE SSE2 HTT Multithreading: 4095 threads / 64 cores Wooohooo!
Oct 25 2006
Chris Miller wrote:On Wed, 25 Oct 2006 05:13:08 -0400, Tomas Lindquist Olsen <tomas famolsen.dk> wrote:aiii. I messed it up :( Try again?Did another update with bunch of fixes. I took the time to read the official cpuid specs from intel and amd and I was not doing it 100% correctly.Vendor string: GenuineIntel Processor string: Intel(R) Pentium(R) 4 CPU 2.66GHz Signature: Family=15 Model=2 Stepping=7 Features: MMX FXSR SSE SSE2 HTT Multithreading: 4095 threads / 64 cores Wooohooo!
Oct 25 2006
On Wed, 25 Oct 2006 06:57:14 -0400, Tomas Lindquist Olsen = <tomas famolsen.dk> wrote:Chris Miller wrote:On Wed, 25 Oct 2006 05:13:08 -0400, Tomas Lindquist Olsen ==<tomas famolsen.dk> wrote:Did another update with bunch of fixes. I took the time to read the ==official cpuid specs from intel and amd and I was not doing it 100% =Vendor string: GenuineIntel Processor string: Intel(R) Pentium(R) 4 CPU 2.66GHz Signature: Family=3D15 Model=3D2 Stepping=3D7 Features: MMX FXSR SSE SSE2 HTT Multithreading: 1 threads / 1 cores Give me back my supercomputer ;)aiii. I messed it up :( Try again?correctly.Vendor string: GenuineIntel Processor string: Intel(R) Pentium(R) 4 CPU 2.66GHz Signature: Family=3D15 Model=3D2 Stepping=3D7 Features: MMX FXSR SSE SSE2 HTT Multithreading: 4095 threads / 64 cores Wooohooo!
Oct 25 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.Doesn't quite work for me, says '0 threads / 0 cores'. I have an Athlon thunderbird model C, 1.4 GHz. The rest of the info looks correct. Vendor string: AuthenticAMD Processor string: AMD Athlon(tm) processor Features: MMX 3DNow! 3DNow!+ MMX+ Multithreading: 0 threads / 0 cores
Oct 24 2006
Vendor string: AuthenticAMD Processor string: AMD Sempron(tm) Features: MMX SSE 3DNow! 3DNow!+ MMX+ Multithreading: 0 threads / 0 cores 0 threads sounds weird, I am on Linux though.
Oct 25 2006
notknown wrote:Vendor string: AuthenticAMD Processor string: AMD Sempron(tm) Features: MMX SSE 3DNow! 3DNow!+ MMX+ Multithreading: 0 threads / 0 cores 0 threads sounds weird, I am on Linux though.Weird indeed. The thread and core fields are initialised to one, and only if HTT is available is the code that set them invoked. As you dont have HTT on the list this really does not make sense. Can you try printing the value of those fields before the 'if (hyperThreading)' in CPUID.this ?
Oct 25 2006
Tomas Lindquist Olsen kirjoitti:notknown wrote:Okay, I added these lines right before that if: writefln("flags=", flags); writefln("misc=", misc); writefln("exflags=", exflags); writefln("apic=", apic); writefln("vendorStr=", vendorStr); writefln("processorStr=", processorStr); writefln("maxThreads=", maxThreads); writefln("maxCores=", maxCores); writefln("manufac=", manufac); It prints now: flags=58981375 misc=0 exflags=3251371007 apic=0 vendorStr=AuthenticAMD processorStr=AMD Sempron(tm) maxThreads=0 maxCores=0 manufac=2 Vendor string: AuthenticAMD Processor string: AMD Sempron(tm) Features: MMX SSE 3DNow! 3DNow!+ MMX+ Multithreading: 0 threads / 0 coresVendor string: AuthenticAMD Processor string: AMD Sempron(tm) Features: MMX SSE 3DNow! 3DNow!+ MMX+ Multithreading: 0 threads / 0 cores 0 threads sounds weird, I am on Linux though.Weird indeed. The thread and core fields are initialised to one, and only if HTT is available is the code that set them invoked. As you dont have HTT on the list this really does not make sense. Can you try printing the value of those fields before the 'if (hyperThreading)' in CPUID.this ?
Oct 25 2006
notknown wrote:Tomas Lindquist Olsen kirjoitti:This seems like a compiler bug. It's declared: uint maxThreads=1; Am I missing something?notknown wrote:Okay, I added these lines right before that if: writefln("flags=", flags); writefln("misc=", misc); writefln("exflags=", exflags); writefln("apic=", apic); writefln("vendorStr=", vendorStr); writefln("processorStr=", processorStr); writefln("maxThreads=", maxThreads); writefln("maxCores=", maxCores); writefln("manufac=", manufac); It prints now: flags=58981375 misc=0 exflags=3251371007 apic=0 vendorStr=AuthenticAMD processorStr=AMD Sempron(tm) maxThreads=0 maxCores=0 manufac=2 Vendor string: AuthenticAMD Processor string: AMD Sempron(tm) Features: MMX SSE 3DNow! 3DNow!+ MMX+ Multithreading: 0 threads / 0 coresVendor string: AuthenticAMD Processor string: AMD Sempron(tm) Features: MMX SSE 3DNow! 3DNow!+ MMX+ Multithreading: 0 threads / 0 cores 0 threads sounds weird, I am on Linux though.Weird indeed. The thread and core fields are initialised to one, and only if HTT is available is the code that set them invoked. As you dont have HTT on the list this really does not make sense. Can you try printing the value of those fields before the 'if (hyperThreading)' in CPUID.this ?
Oct 25 2006
Tomas Lindquist Olsen kirjoitti:notknown wrote:Could it be because you run the code from constructor? Maybe it is not yet set at that point, just guessing?Tomas Lindquist Olsen kirjoitti:This seems like a compiler bug. It's declared: uint maxThreads=1; Am I missing something?notknown wrote:Okay, I added these lines right before that if: writefln("flags=", flags); writefln("misc=", misc); writefln("exflags=", exflags); writefln("apic=", apic); writefln("vendorStr=", vendorStr); writefln("processorStr=", processorStr); writefln("maxThreads=", maxThreads); writefln("maxCores=", maxCores); writefln("manufac=", manufac); It prints now: flags=58981375 misc=0 exflags=3251371007 apic=0 vendorStr=AuthenticAMD processorStr=AMD Sempron(tm) maxThreads=0 maxCores=0 manufac=2 Vendor string: AuthenticAMD Processor string: AMD Sempron(tm) Features: MMX SSE 3DNow! 3DNow!+ MMX+ Multithreading: 0 threads / 0 coresVendor string: AuthenticAMD Processor string: AMD Sempron(tm) Features: MMX SSE 3DNow! 3DNow!+ MMX+ Multithreading: 0 threads / 0 cores 0 threads sounds weird, I am on Linux though.Weird indeed. The thread and core fields are initialised to one, and only if HTT is available is the code that set them invoked. As you dont have HTT on the list this really does not make sense. Can you try printing the value of those fields before the 'if (hyperThreading)' in CPUID.this ?
Oct 25 2006
Okay, must be compiler bug, just checked and it is not touched anywhere except the initialization.This seems like a compiler bug. It's declared: uint maxThreads=1; Am I missing something?Could it be because you run the code from constructor? Maybe it is not yet set at that point, just guessing?
Oct 25 2006
notknown wrote:Do you think you could narrow this down? Seems it's not happening for Windows users. Might as well report it if it's a real bug. Basically some testing of class member initialisers.Okay, must be compiler bug, just checked and it is not touched anywhere except the initialization.This seems like a compiler bug. It's declared: uint maxThreads=1; Am I missing something?Could it be because you run the code from constructor? Maybe it is not yet set at that point, just guessing?
Oct 25 2006
Tomas Lindquist Olsen kirjoitti:notknown wrote:Okay, I do not know bug report systems, so wrote narrowed test to D.bugs. Hope it works that way too.Do you think you could narrow this down? Seems it's not happening for Windows users. Might as well report it if it's a real bug. Basically some testing of class member initialisers.Okay, must be compiler bug, just checked and it is not touched anywhere except the initialization.This seems like a compiler bug. It's declared: uint maxThreads=1; Am I missing something?Could it be because you run the code from constructor? Maybe it is not yet set at that point, just guessing?
Oct 26 2006