ThreadSchedule 1.0.0
Modern C++ thread management library
Loading...
Searching...
No Matches
threadschedule::CpuTopology Struct Reference

Snapshot of basic CPU/NUMA topology. More...

#include <topology.hpp>

Public Attributes

int cpu_count {0}
int numa_nodes {1}
std::vector< std::vector< int > > node_to_cpus

Detailed Description

Snapshot of basic CPU/NUMA topology.

Value type (copyable). Populated by read_topology().

  • cpu_count: total logical CPUs (from std::thread::hardware_concurrency).
  • numa_nodes: number of NUMA nodes (always 1 on Windows; detected via /sys/devices/system/node/ on Linux).
  • node_to_cpus: mapping from NUMA node index to the set of logical CPU indices belonging to that node.

Definition at line 38 of file topology.hpp.

Member Data Documentation

◆ cpu_count

int threadschedule::CpuTopology::cpu_count {0}

Definition at line 40 of file topology.hpp.

◆ node_to_cpus

std::vector<std::vector<int> > threadschedule::CpuTopology::node_to_cpus

Definition at line 42 of file topology.hpp.

◆ numa_nodes

int threadschedule::CpuTopology::numa_nodes {1}

Definition at line 41 of file topology.hpp.


The documentation for this struct was generated from the following file: