There are three different kinds of CPU sets and node sets. "topology" sets correspond exactly to PU and NUMANode objects in the topology. "complete" sets may be larger if some resources are missing in the topology because they are offline, disallowed, etc. "allowed" sets are equal to "topology" sets by default, but they may be smaller if some disallowed resources are exposed in the topology (if the topology flag HWLOC_TOPOLOGY_FLAG_INCLUDE_DISALLOWED is set).
◆ hwloc_topology_get_topology_cpuset()
Get the topology CPU set.
- Returns
- the CPU set of processors of the system for which hwloc provides topology information.
- Note
- Only CPUs that have a corresponding PU object in the topology are listed in this set. As explained in hwloc_obj::cpuset, it may be smaller than the complete cpuset returned by hwloc_topology_get_complete_cpuset() since it does not include offline CPUs, etc. It may also be larger than the set returned by hwloc_topology_get_allowed_cpuset() if disallowed resources are enabled in the topology.
-
This is equivalent to retrieving the machine root object CPU-set.
-
This function cannot return
NULL.
-
The returned cpuset is not newly allocated and should thus not be changed or freed; hwloc_bitmap_dup() must be used to obtain a local copy.
◆ hwloc_topology_get_complete_cpuset()
Get the complete CPU set.
- Returns
- the complete CPU set of processors of the system.
- Note
- As explained in hwloc_obj::complete_cpuset, this set may be larger than the main cpuset returned by hwloc_topology_get_topology_cpuset() since it may also contain additional CPUs not exposed as PU objects in the topology (offline CPUs, etc).
-
This is equivalent to retrieving the machine root object complete CPU-set.
-
This function cannot return
NULL.
-
The returned cpuset is not newly allocated and should thus not be changed or freed; hwloc_bitmap_dup() must be used to obtain a local copy.
◆ hwloc_topology_get_allowed_cpuset()
◆ hwloc_topology_get_topology_nodeset()
Get the topology memory node set.
- Returns
- the node set of memory in the system for which hwloc provides topology information.
- Note
- Only memory nodes that have a corresponding NUMA node object in the topology are listed in this set. As explained in hwloc_obj::nodeset, it may be smaller than the complete nodeset returned by hwloc_topology_get_complete_nodeset() since it does not include offline or empty memory nodes, etc. It may also be larger than the set returned by hwloc_topology_get_allowed_nodeset() if disallowed resources are enabled in the topology.
-
This is equivalent to retrieving the machine root object nodeset.
-
This function cannot return
NULL.
-
The returned nodeset is not newly allocated and should thus not be changed or freed; hwloc_bitmap_dup() must be used to obtain a local copy.
◆ hwloc_topology_get_complete_nodeset()
Get the complete node set.
- Returns
- the complete node set of memory in the system.
- Note
- As explained in hwloc_obj::complete_nodeset, this set may be larger than the main nodeset returned by hwloc_topology_get_topology_nodeset() since it may also contain additional nodes not exposed as NUMA node objects in the topology (empty or offline NUMA nodes, etc).
-
This is equivalent to retrieving the machine root object complete node set.
-
This function cannot return
NULL.
-
The returned nodeset is not newly allocated and should thus not be changed or freed; hwloc_bitmap_dup() must be used to obtain a local copy.
◆ hwloc_topology_get_allowed_nodeset()