public static member function
static unsigned hardware_concurrency() noexcept;
Detect hardware concurrency
Returns the number of hardware thread contexts.
The interpretation of this value is system- and implementation- specific, and may not be exact, but just an approximation.
Note that this does not need to match the actual number of processors or cores available in the system: A system can support multiple threads per processing unit, or restrict the access to its resources to the program.
If this value is not computable or well defined, the function returns
A hint on the number of hardware thread contexts.
Or zero, if this value is not computable or well defined.
No-throw guarantee: never throws exceptions.