Struct hwloc::TopologyObject [] [src]

pub struct TopologyObject {
    // some fields omitted
}

Methods

impl TopologyObject

fn object_type(&self) -> ObjectType

The type of the object.

fn memory(&self) -> &TopologyObjectMemory

The memory attributes of the object.

fn os_index(&self) -> u32

The OS-provided physical index number.

It is not guaranteed unique across the entire machine, except for PUs and NUMA nodes.

fn name(&self) -> String

The name of the object, if set.

fn depth(&self) -> u32

Vertical index in the hierarchy.

If the topology is symmetric, this is equal to the parent depth plus one, and also equal to the number of parent/child links from the root object to here.

fn logical_index(&self) -> u32

Horizontal index in the whole list of similar objects, hence guaranteed unique across the entire machine.

Could be a "cousin_rank" since it's the rank within the "cousin" list below.

fn sibling_rank(&self) -> u32

This objects index in the parents children list.

fn arity(&self) -> u32

The number of direct children.

fn symmetric_subtree(&self) -> bool

Set if the subtree of objects below this object is symmetric, which means all children and their children have identical subtrees.

fn children(&self) -> Vec<&TopologyObject>

All direct children of this object.

fn next_cousin(&self) -> Option<&TopologyObject>

Next object of same type and depth.

fn prev_cousin(&self) -> Option<&TopologyObject>

Previous object of same type and depth.

fn first_child(&self) -> Option<&TopologyObject>

First child of the next depth.

fn last_child(&self) -> Option<&TopologyObject>

Last child of the next depth.

fn parent(&self) -> Option<&TopologyObject>

Last child of the next depth.

fn prev_sibling(&self) -> Option<&TopologyObject>

Previous object below the same parent.

fn next_sibling(&self) -> Option<&TopologyObject>

Next object below the same parent.

fn cpuset(&self) -> Option<CpuSet>

CPUs covered by this object.

This is the set of CPUs for which there are PU objects in the topology under this object, i.e. which are known to be physically contained in this object and known how (the children path between this object and the PU objects).

fn complete_cpuset(&self) -> Option<CpuSet>

The complete CPU set of logical processors of this object.

This includes not only the same as the cpuset field, but also the CPUs for which topology information is unknown or incomplete, and the CPUs that are ignored when the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM flag is not set. Thus no corresponding PU object may be found in the topology, because the precise position is undefined. It is however known that it would be somewhere under this object.

fn online_cpuset(&self) -> Option<CpuSet>

The CPU set of online logical processors.

This includes the CPUs contained in this object that are online, i.e. draw power and can execute threads. It may however not be allowed to bind to them due to administration rules, see allowed_cpuset.

fn allowed_cpuset(&self) -> Option<CpuSet>

The CPU set of allowed logical processors.

This includes the CPUs contained in this object which are allowed for binding, i.e. passing them to the hwloc binding functions should not return permission errors. This is usually restricted by administration rules. Some of them may however be offline so binding to them may still not be possible, see online_cpuset.

fn nodeset(&self) -> Option<NodeSet>

NUMA nodes covered by this object or containing this object.

This is the set of NUMA nodes for which there are NODE objects in the topology under or containing it and known how (the children path between this object and the NODE objects).

In the end, these nodes are those that are close to the current object. If the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM configuration flag is set, some of these nodes may not be allowed for allocation, see allowed_nodeset.

If there are no NUMA nodes in the machine, all the memory is close to this object, so the nodeset is full.

fn complete_nodeset(&self) -> Option<NodeSet>

The complete NUMA node set of this object,.

This includes not only the same as the nodeset field, but also the NUMA nodes for which topology information is unknown or incomplete, and the nodes that are ignored when the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM flag is not set. Thus no corresponding NODE object may be found in the topology, because the precise position is undefined. It is however known that it would be somewhere under this object.

If there are no NUMA nodes in the machine, all the memory is close to this object, so complete_nodeset is full.

fn allowed_nodeset(&self) -> Option<NodeSet>

The set of allowed NUMA memory nodes.

This includes the NUMA memory nodes contained in this object which are allowed for memory allocation, i.e. passing them to NUMA node-directed memory allocation should not return permission errors. This is usually restricted by administration rules.

If there are no NUMA nodes in the machine, all the memory is close to this object, so allowed_nodeset is full.

fn cache_attributes(&self) -> Option<&TopologyObjectCacheAttributes>

Trait Implementations

impl Display for TopologyObject

fn fmt(&self, f: &mut Formatter) -> Result