| 50 | }; |
| 51 | |
| 52 | static size_t initial_cpu_count() { |
| 53 | const long configured = sysconf(_SC_NPROCESSORS_CONF); |
| 54 | return (std::max)(size_t(128), configured > 0 ? (size_t) configured : size_t(0)); |
| 55 | } |
| 56 | |
| 57 | // Query with CPU_ALLOC rather than cpu_set_t: this must observe CPUs beyond CPU_SETSIZE too. |
| 58 | static bool get_affinity(std::vector<int>& ids) { |
no outgoing calls
no test coverage detected