We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e4802b commit 8eb6540Copy full SHA for 8eb6540
common/common.cpp
@@ -108,7 +108,7 @@ int32_t get_num_physical_cores() {
108
return n_threads > 0 ? (n_threads <= 4 ? n_threads : n_threads / 2) : 4;
109
}
110
111
-#if defined(__x86_64__) && defined(__linux__)
+#if defined(__x86_64__) && defined(__gnu_linux__)
112
#include <pthread.h>
113
114
static void cpuid(unsigned leaf, unsigned subleaf,
@@ -162,7 +162,7 @@ static int count_math_cpus(int cpu_count) {
162
* Returns number of CPUs on system that are useful for math.
163
*/
164
int get_math_cpu_count() {
165
166
int cpu_count = sysconf(_SC_NPROCESSORS_ONLN);
167
if (cpu_count < 1) {
168
return get_num_physical_cores();
0 commit comments