llvm::get_physical_cores

Returns how many physical cores (as opposed to logical cores returned from thread::hardware_concurrency(), which includes hyperthreads). Returns -1 if unknown for the current host system.

Synopsis

Declared in <llvm/Support/Threading.h>

int
get_physical_cores();