File threads.hpp¶
Functions
-
static inline uint32 getNumAvailableCpuCores()¶
Returns the number of CPU cores available on the machine, regardless of whether multi-threading support is enabled or not.
- Returns:
The number of CPU cores available on the machine
-
static inline uint32 getNumAvailableThreads(uint32 numPreferredThreads)¶
Returns the number of threads that are available for parallelized algorithms. If multi-threading support is disabled, the number of available threads is limited to 1.
- Parameters:
numPreferredThreads – The preferred number of threads. Must be at least 1 or 0, if all available CPU cores should be utilized
- Returns:
The number of available threads