std.parallelism: Request for Review [Summary of discussion]

jasonw user at webmails.org
Tue Mar 1 10:06:20 PST 2011


dsimcha Wrote:

> Ok, so that's one issue to cross off the list.  To summarize the discussion so
> far, most of it's revolved around the issue of automatically determining how many
> CPUs are available and therefore how many threads the default pool should have.
> Previously, std.parallelism had been using core.cpuid for this task.  This module
> doesn't work yet on 64 bits and doesn't and isn't supposed to determine how many
> sockets/physical CPUs are available.  This was a point of miscommunication.
> 
> std.parallelism now uses OS-specific APIs to determine the total number of cores
> available across all physical CPUs.  This appears to Just Work (TM) on 32-bit
> Windows, 32- and 64-bit Linux, and 32-bit Mac OS.

Does a Hyperthread machine have 2x as much cores & worker threads ? In Pentium 4 HT might reduce throughput, in Core i7 increase it.


More information about the Digitalmars-d mailing list