std::thread::available_parallelism() says
On Windows:
- It may undercount the amount of parallelism available on systems with more than 64 logical CPUs. However, programs typically need specific support to take advantage of more than 64 logical CPUs, and in the absence of such support, the number returned by this function accurately reflects the number of logical CPUs the program can use by default.
and per https://learn.microsoft.com/en-us/windows/win32/procthread/processor-groups#behavior-starting-with-windows-11-and-windows-server-2022 this was true before Windows 11/Server 2022, but on these and subsequent systems processes are usefully scheduled across all CPUs by default.
The implementation uses GetSystemInfo().dwNumberOfProcessors. I think GetActiveProcessorCount(ALL_PROCESSOR_GROUPS) will return the same data at full range?
std::thread::available_parallelism()saysand per https://learn.microsoft.com/en-us/windows/win32/procthread/processor-groups#behavior-starting-with-windows-11-and-windows-server-2022 this was true before Windows 11/Server 2022, but on these and subsequent systems processes are usefully scheduled across all CPUs by default.
The implementation uses
GetSystemInfo().dwNumberOfProcessors. I think GetActiveProcessorCount(ALL_PROCESSOR_GROUPS) will return the same data at full range?