---
name: "hwloc_get_next_obj_covering_cpuset_by_depth"
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_find_covering"
---

# hwloc\_get\_next\_obj\_covering\_cpuset\_by\_depth(3)

Finding Objects covering at least CPU set

Part of [hwlocality\_helper\_find\_covering(3)](/hwlocality_helper_find_covering/3.md).

## NAME

hwlocality\_helper\_find\_covering - Finding Objects covering at least CPU set

## SYNOPSIS

### Functions

**hwloc\_obj\_t** **hwloc\_get\_child\_covering\_cpuset** (**hwloc\_topology\_t** topology, **hwloc\_const\_cpuset\_t** set, **hwloc\_obj\_t** parent)\
 **hwloc\_obj\_t** **hwloc\_get\_obj\_covering\_cpuset** (**hwloc\_topology\_t** topology, **hwloc\_const\_cpuset\_t** set)\
 **hwloc\_obj\_t** **hwloc\_get\_next\_obj\_covering\_cpuset\_by\_depth** (**hwloc\_topology\_t** topology, **hwloc\_const\_cpuset\_t** set, int depth, **hwloc\_obj\_t** prev)\
 **hwloc\_obj\_t** **hwloc\_get\_next\_obj\_covering\_cpuset\_by\_type** (**hwloc\_topology\_t** topology, **hwloc\_const\_cpuset\_t** set, **hwloc\_obj\_type\_t** type, **hwloc\_obj\_t** prev)\

## Detailed Description

## Function Documentation

### hwloc\_obj\_t hwloc\_get\_child\_covering\_cpuset (hwloc\_topology\_t topology, hwloc\_const\_cpuset\_t set, hwloc\_obj\_t parent) \[inline\]

Get the child covering at least CPU set set.

**Returns**

the child that covers the set entirely.

NULL if no child matches or if set is empty.

**Note**

This function cannot work if parent does not have a CPU set (I/O or Misc objects).

### hwloc\_obj\_t hwloc\_get\_next\_obj\_covering\_cpuset\_by\_depth (hwloc\_topology\_t topology, hwloc\_const\_cpuset\_t set, int depth, hwloc\_obj\_t prev) \[inline\]

Iterate through same-depth objects covering at least CPU set set. The next invokation should pass the previous return value in prev so as to obtain the next object covering at least another part of set.

**Returns**

the first object at depth depth covering at least part of CPU set set if object prev is NULL.

the next one if prev is not NULL.

NULL if there is no next object.

**Note**

This function cannot work if objects at the given depth do not have CPU sets (I/O or Misc objects).

### hwloc\_obj\_t hwloc\_get\_next\_obj\_covering\_cpuset\_by\_type (hwloc\_topology\_t topology, hwloc\_const\_cpuset\_t set, hwloc\_obj\_type\_t type, hwloc\_obj\_t prev) \[inline\]

Iterate through same-type objects covering at least CPU set set. The next invokation should pass the previous return value in prev so as to obtain the next object of type type covering at least another part of set.

**Returns**

the first object of type type covering at least part of CPU set set if object prev is NULL.

the next one if prev is not NULL.

NULL if there is no next object.

NULL if there is no depth for the given type.

NULL if there are multiple depths for the given type, the caller should fallback to **hwloc\_get\_next\_obj\_covering\_cpuset\_by\_depth()**.

**Note**

This function cannot work if objects of the given type do not have CPU sets (I/O or Misc objects).

### hwloc\_obj\_t hwloc\_get\_obj\_covering\_cpuset (hwloc\_topology\_t topology, hwloc\_const\_cpuset\_t set) \[inline\]

Get the lowest object covering at least CPU set set.

**Returns**

the lowest object covering the set entirely.

NULL if no object matches or if set is empty.

## Author

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