[libcxx] r185451 - Windows support in thread::hardware_concurrency.
Howard Hinnant
hhinnant at apple.com
Tue Jul 2 12:51:54 PDT 2013
On Jul 2, 2013, at 3:37 PM, Nico Rieck <nico.rieck at gmail.com> wrote:
> On 02.07.2013 19:53, Howard Hinnant wrote:
>> +#elif defined(_WIN32)
>> + SYSTEM_INFO info;
>> + GetSystemInfo(&info);
>> + return info.dwNumberOfProcessors;
>> #else // defined(CTL_HW) && defined(HW_NCPU)
>
> I'm not that familiar with the implementation for the other platforms, but this snippet returns the number of logical processors. In my local Windows port I use the number of cores, as I think that's more appropriate. This is also what MSVCRT does on Windows.
>
> -Nico
If you could submit a patch (preferably with an updated CREDITS.TXT), that would be much appreciated.
Howard
More information about the cfe-commits
mailing list