std.parallelism: Request for Review
Russel Winder
russel at russel.org.uk
Mon Feb 28 04:02:30 PST 2011
On Mon, 2011-02-28 at 10:41 +0100, Don wrote:
[ . . . ]
> As the name says, it is * cores per CPU *. That is _not_ the same as the
> total number of cores in the machine.
I guess then the missing extension is to have a function that returns an
array opf processor references so that the core count can be measured?
> The documentation probably doesn't state that strongly enough, but
> currently there is no known bug in the implementation of
> core.cpuid.coresPerCPU.
OK so my complaints were somewhat misdirected, apologies.
The fact remains though that it seems there is no way in D or Phobos to
pick up the number of "processors" available to a Linux or Mac OS X
machine -- I guess the same applies to Windows but I personally don't
use that OS so don't really care about that one ;-)
> It's an OS issue, anyway: just because a machine has 64 cores, is no
> guarantee that it will give you access to all of them. std.parallelism
> shouldn't be using core.cpuid for that purpose.
I had thought you were arguing that D/Phobos couldn't rely on waiting
for OS functionality, that it had to use direct access to the processor
techniques. Maybe I misunderstood what you were saying. If so, my
apologies.
Linux claims to have 8 processors on my twin-Xeon box. std.parallelism
therefore needs some form of support from D and/or Phobos to say "how
many parallel threads can this platform sustain". All other parallelism
frameworks I use handle this no problem.
I accept your argument about core.cpuid and so will not investigate it
further, other than to say it needs to work on 64-bit processors as well
as 32-bit ones. The campaign now must be to have an OS query capability
to find the number of processors.
Thanks.
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at russel.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110228/ba8a8eaa/attachment.pgp>
More information about the Digitalmars-d
mailing list