The NUMA nodes with CPUs this machine has (0.2.2: the split is tried by itself from 2 on). Linux: the sysfs node folder (numa_pool.hpp); Windows: GetNumaHighestNodeNumber; any other system, or a sandbox that hides the folder: 1.
| 689 | // The NUMA nodes with CPUs this machine has (0.2.2: the split is tried by itself from 2 on). Linux: the sysfs node folder |
| 690 | // (numa_pool.hpp); Windows: GetNumaHighestNodeNumber; any other system, or a sandbox that hides the folder: 1. |
| 691 | int numa_node_count() { |
| 692 | #if defined(__linux__) |
| 693 | return (std::max)(1, numa_cpu_node_count_at(sysfs_root() + "/devices/system/node")); |
| 694 | #elif defined(_WIN32) |
| 695 | ULONG highest = 0; |
| 696 | return GetNumaHighestNodeNumber(&highest) ? (int) highest + 1 : 1; |
| 697 | #else |
| 698 | return 1; |
| 699 | #endif |
| 700 | } |
| 701 | |
| 702 | // The real-node split for threads on `thread_core` (numa_pool.hpp). On Linux it runs whenever >=2 nodes exist; |
| 703 | // on Windows (#6523/#6554) it runs across processor groups when STRATA_NUMA_ARENA=1 or explicit STRATA_NUMA_SPLIT=1. |
no test coverage detected