A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.com/reference/thread/thread/hardware_concurrency/ below:

public static member function

<thread>

std::thread::hardware_concurrency
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 0.



Parameters none

Return value A hint on the number of hardware thread contexts.
Or zero, if this value is not computable or well defined.

Exception safetyNo-throw guarantee: never throws exceptions.

See also
thread::native_handle
Get native handle (public member function)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4