公共静态成员函数;(public static member function)
static unsigned hardware_concurrency() noexcept;
检测硬件的并发特性(Detecthardware concurrency)
返回硬件线程上下文的数量。(Returnsthe number of hardware thread contexts.)
The interpretation of this value is system- andimplementation- specific, and may not be exact, but just an approximation.
Note that this does not need to match the actualnumber of processors or cores available in the system: A system can supportmultiple threads per processing unit, or restrict the access to its resourcesto the program.
If this value is not computable or well defined,the function returns 0
.
Parameters:没有参数
Return value:
A hint on the number of hardware thread contexts.( 关于硬件线程上下文的数量的提示。)
来源:http://www.cplusplus.com/reference/thread/thread/hardware_concurrency/