ΒΆunsigned int hardware_concurrency()

Description

Get the number of threads that the current program can execute concurrently. On some systems std::thread::hardware_concurrency() returns the total number of cores, without taking affinity into consideration. Returns 1 when LLVM is configured with LLVM_ENABLE_THREADS=OFF. Fallback to std::thread::hardware_concurrency() if sched_getaffinity is not available.

Declared at: llvm/include/llvm/Support/Threading.h:159