MCPcopy Create free account
hub / github.com/Niko1221/Strata / initial_cpu_count

Function initial_cpu_count

engine/src/kernels/cpu/pool_affinity_linux_test.cpp:52–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50};
51
52static 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.
58static bool get_affinity(std::vector<int>& ids) {

Callers 2

get_affinityFunction · 0.85
set_affinityFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected