pub struct NumaTopology {
pub node_count: usize,
pub cpus_per_node: Vec<Vec<usize>>,
pub cpu_count: usize,
}Expand description
NUMA topology information
Fields§
§node_count: usizeNumber of NUMA nodes
cpus_per_node: Vec<Vec<usize>>CPUs per NUMA node
cpu_count: usizeTotal CPU count
Implementations§
Source§impl NumaTopology
impl NumaTopology
Sourcepub fn parse_cpu_list(s: &str) -> Vec<usize>
pub fn parse_cpu_list(s: &str) -> Vec<usize>
Parse CPU list format like “0-3,5,7-9” into individual CPU numbers
Sourcepub fn get() -> &'static NumaTopology
pub fn get() -> &'static NumaTopology
Get cached topology (lazily initialized)
Sourcepub fn cpu_to_node(&self, cpu: usize) -> usize
pub fn cpu_to_node(&self, cpu: usize) -> usize
Get the NUMA node for a given CPU
Trait Implementations§
Source§impl Clone for NumaTopology
impl Clone for NumaTopology
Source§fn clone(&self) -> NumaTopology
fn clone(&self) -> NumaTopology
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NumaTopology
impl RefUnwindSafe for NumaTopology
impl Send for NumaTopology
impl Sync for NumaTopology
impl Unpin for NumaTopology
impl UnwindSafe for NumaTopology
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more