hwlocality\_object\_sets(3) Library Functions Manual hwlocality\_object\_sets(3)

# [NAME](#NAME)

hwlocality\_object\_sets - Object Sets (hwloc\_cpuset\_t and hwloc\_nodeset\_t)

# [SYNOPSIS](#SYNOPSIS)

## [Typedefs](#Typedefs)

typedef **hwloc\_bitmap\_t** **hwloc\_cpuset\_t**  
typedef **hwloc\_const\_bitmap\_t** **hwloc\_const\_cpuset\_t**  
typedef **hwloc\_bitmap\_t** **hwloc\_nodeset\_t**  
typedef **hwloc\_const\_bitmap\_t** **hwloc\_const\_nodeset\_t**

# [Detailed Description](#Detailed_Description)

Hwloc uses bitmaps to represent two distinct kinds of object sets: CPU sets (**hwloc\_cpuset\_t**) and NUMA node sets (**hwloc\_nodeset\_t**). These types are both typedefs to a common back end type (**hwloc\_bitmap\_t**), and therefore all the hwloc bitmap functions are applicable to both **hwloc\_cpuset\_t** and **hwloc\_nodeset\_t** (see **The bitmap API**).

The rationale for having two different types is that even though the actions one wants to perform on these types are the same (e.g., enable and disable individual items in the set/mask), they're used in very different contexts: one for specifying which processors to use and one for specifying which NUMA nodes to use. Hence, the name difference is really just to reflect the intent of where the type is used.

# [Typedef Documentation](#Typedef_Documentation)

## typedef **hwloc\_const\_bitmap\_t** **hwloc\_const\_cpuset\_t**

A non-modifiable **hwloc\_cpuset\_t**.

## typedef **hwloc\_const\_bitmap\_t** **hwloc\_const\_nodeset\_t**

A non-modifiable **hwloc\_nodeset\_t**.

## typedef **hwloc\_bitmap\_t** **hwloc\_cpuset\_t**

A CPU set is a bitmap whose bits are set according to CPU physical OS indexes. It may be consulted and modified with the bitmap API as any **hwloc\_bitmap\_t** (see **hwloc/bitmap.h**).

Each bit may be converted into a PU object using **hwloc\_get\_pu\_obj\_by\_os\_index()**.

**See also**

faq\_indexes

## typedef **hwloc\_bitmap\_t** **hwloc\_nodeset\_t**

A node set is a bitmap whose bits are set according to NUMA memory node physical OS indexes. It may be consulted and modified with the bitmap API as any **hwloc\_bitmap\_t** (see **hwloc/bitmap.h**). Each bit may be converted into a NUMA node object using **hwloc\_get\_numanode\_obj\_by\_os\_index()**.

**See also**

faq\_indexes

When binding memory on a system without any NUMA node, the single main memory bank is considered as NUMA node #0.

See also **Converting between CPU sets and node sets**.

# [Author](#Author)

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

Version 2.15.0 Hardware Locality (hwloc)

---

Document: hwlocality_object_sets(3) from hwloc-cuda-12.8 2.15.0-r0 (Chainguard OS)
Source: https://github.com/open-mpi/hwloc
