ThreadSchedule 3.0.0
Modern C++ thread management library
Loading...
Searching...
No Matches
threadschedule::advanced::cpu_topology Struct Reference

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

#include <cpu_topology.hpp>

Public Attributes

std::size_t cpu_count { 0 }
 
std::size_t numa_nodes { 1 }
 
std::vector< std::vector< cpu_id > > 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 CPU-bearing NUMA nodes (always 1 on Windows; detected via the Linux sysfs node lists).
  • node_to_cpus: mapping from NUMA node index to the set of logical CPU indices belonging to that node.

Definition at line 107 of file cpu_topology.hpp.

Member Data Documentation

◆ cpu_count

std::size_t threadschedule::advanced::cpu_topology::cpu_count { 0 }

Definition at line 109 of file cpu_topology.hpp.

Referenced by threadschedule::advanced::read_topology().

◆ node_to_cpus

std::vector<std::vector<cpu_id> > threadschedule::advanced::cpu_topology::node_to_cpus

Definition at line 111 of file cpu_topology.hpp.

Referenced by threadschedule::advanced::read_topology().

◆ numa_nodes

std::size_t threadschedule::advanced::cpu_topology::numa_nodes { 1 }

Definition at line 110 of file cpu_topology.hpp.

Referenced by threadschedule::advanced::read_topology().


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