Skip to content

Commit 15ab362

Browse files
committed
Detecting physical cores in GNU/Linux
1 parent 706190c commit 15ab362

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/benchmark/system.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ std::pair<int, int> System::CpuTotalCores()
209209
}
210210

211211
size_t logical = cores.size();
212-
long physical = sysconf(_SC_N2PROCESSORS_ONLN);
212+
long physical = sysconf(_SC_NPROCESSORS_ONLN);
213213
return std::make_pair(logical, physical);
214214
#elif defined(_WIN32) || defined(_WIN64)
215215
BOOL allocated = FALSE;

0 commit comments

Comments
 (0)