MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / cpu_count_math_cpus

Function cpu_count_math_cpus

common/common.cpp:168–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168static int cpu_count_math_cpus(int n_cpu) {
169 int result = 0;
170 for (int cpu = 0; cpu < n_cpu; ++cpu) {
171 if (pin_cpu(cpu)) {
172 return -1;
173 }
174 if (is_running_on_efficiency_core()) {
175 continue; // efficiency cores harm lockstep threading
176 }
177 ++cpu; // hyperthreading isn't useful for linear algebra
178 ++result;
179 }
180 return result;
181}
182
183#endif // __x86_64__ && __linux__
184

Callers 1

cpu_get_num_mathFunction · 0.85

Calls 2

pin_cpuFunction · 0.85

Tested by

no test coverage detected