#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct NumaNodesData
{
pub hasCpu: NumaSocketsActive,
pub hasMemory: NumaSocketsActive,
pub hasNormalMemory: NumaSocketsActive,
pub online: NumaSocketsActive,
pub possible: NumaSocketsActive,
}
impl NumaNodesData
{
pub fn nodesThatAreOnlineWithACpuAndMemory(&self) -> NumaSocketsActive
{
let usefulNumaNodes = self.online.intersect(&self.hasCpu).intersect(&self.hasMemory);
assert!(usefulNumaNodes.hasAtLeastOneActive(), "Apparently, there are no useful NUMA nodes yet we are running as a program...");
usefulNumaNodes
}
}