Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

CPU pool: fix dangling else in the Linux physical_cores() branch

Vistawizardbe028948f45e
diff --git a/src/kernels/cpu/pool.cpp b/src/kernels/cpu/pool.cpp
index 2b963ad09..dfbb9de41 100644
--- a/src/kernels/cpu/pool.cpp
+++ b/src/kernels/cpu/pool.cpp
@@ -49,11 +49,12 @@ std::vector<int> physical_cores(bool skip_first) {
#else
cpu_set_t set;
CPU_ZERO(&set);
- if (sched_getaffinity(0, sizeof set, &set) == 0)
+ if (sched_getaffinity(0, sizeof set, &set) == 0) {
for (int i = 0; i < CPU_SETSIZE; ++i)
if (CPU_ISSET(i, &set)) cores.push_back(i);
- else
+ } else {
for (unsigned i = 0; i < std::thread::hardware_concurrency(); ++i) cores.push_back((int) i);
+ }
#endif
if (skip_first && !cores.empty()) cores.erase(cores.begin());
return cores;