---
name: "hwlocality_helper_topology_sets"
section: "3"
platform: "linux"
package: "hwloc"
version: "2.15.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/hwlocality_helper_topology_sets"
---

# hwlocality\_helper\_topology\_sets(3)

CPU and node sets of entire topologies

## NAME

hwlocality\_helper\_topology\_sets - CPU and node sets of entire topologies

## SYNOPSIS

### Functions

**hwloc\_const\_cpuset\_t** **hwloc\_topology\_get\_complete\_cpuset** (**hwloc\_topology\_t** topology)\
 **hwloc\_const\_cpuset\_t** **hwloc\_topology\_get\_topology\_cpuset** (**hwloc\_topology\_t** topology)\
 **hwloc\_const\_cpuset\_t** **hwloc\_topology\_get\_allowed\_cpuset** (**hwloc\_topology\_t** topology)\
 **hwloc\_const\_nodeset\_t** **hwloc\_topology\_get\_complete\_nodeset** (**hwloc\_topology\_t** topology)\
 **hwloc\_const\_nodeset\_t** **hwloc\_topology\_get\_topology\_nodeset** (**hwloc\_topology\_t** topology)\
 **hwloc\_const\_nodeset\_t** **hwloc\_topology\_get\_allowed\_nodeset** (**hwloc\_topology\_t** topology)\

## Detailed Description

## Function Documentation

### hwloc\_const\_cpuset\_t hwloc\_topology\_get\_allowed\_cpuset (hwloc\_topology\_t topology)

Get allowed CPU set.

**Returns**

the CPU set of allowed processors of the system.

**Note**

This function cannot return NULL.

If the topology flag **HWLOC\_TOPOLOGY\_FLAG\_INCLUDE\_DISALLOWED** was not set, this is identical to **hwloc\_topology\_get\_topology\_cpuset()**, which means all PUs are allowed.

If **HWLOC\_TOPOLOGY\_FLAG\_INCLUDE\_DISALLOWED** was set, applying **hwloc\_bitmap\_intersects()** on the result of this function and on an object cpuset checks whether there are allowed PUs inside that object. Applying **hwloc\_bitmap\_and()** returns the list of these allowed PUs.

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\_const\_nodeset\_t hwloc\_topology\_get\_allowed\_nodeset (hwloc\_topology\_t topology)

Get allowed node set.

**Returns**

the node set of allowed memory of the system.

**Note**

This function cannot return NULL.

If the topology flag **HWLOC\_TOPOLOGY\_FLAG\_INCLUDE\_DISALLOWED** was not set, this is identical to **hwloc\_topology\_get\_topology\_nodeset()**, which means all NUMA nodes are allowed.

If **HWLOC\_TOPOLOGY\_FLAG\_INCLUDE\_DISALLOWED** was set, applying **hwloc\_bitmap\_intersects()** on the result of this function and on an object nodeset checks whether there are allowed NUMA nodes inside that object. Applying **hwloc\_bitmap\_and()** returns the list of these allowed NUMA nodes.

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\_const\_cpuset\_t hwloc\_topology\_get\_complete\_cpuset (hwloc\_topology\_t topology)

Get complete CPU set.

**Returns**

the complete CPU set of processors of the system.

**Note**

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.

This is equivalent to retrieving the root object complete CPU-set.

### hwloc\_const\_nodeset\_t hwloc\_topology\_get\_complete\_nodeset (hwloc\_topology\_t topology)

Get complete node set.

**Returns**

the complete node set of memory of the system.

**Note**

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.

This is equivalent to retrieving the root object complete nodeset.

### hwloc\_const\_cpuset\_t hwloc\_topology\_get\_topology\_cpuset (hwloc\_topology\_t topology)

Get topology CPU set.

**Returns**

the CPU set of processors of the system for which hwloc provides topology information. This is equivalent to the cpuset of the system object.

**Note**

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.

This is equivalent to retrieving the root object CPU-set.

### hwloc\_const\_nodeset\_t hwloc\_topology\_get\_topology\_nodeset (hwloc\_topology\_t topology)

Get topology node set.

**Returns**

the node set of memory of the system for which hwloc provides topology information. This is equivalent to the nodeset of the system object.

**Note**

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.

This is equivalent to retrieving the root object nodeset.

## Author

Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code.
