---
name: "hwlocality_helper_find_coverings"
section: "3"
platform: "linux"
package: "libhwloc-doc"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/hwlocality_helper_find_coverings"
---

# hwlocality\_helper\_find\_coverings(3)

## NAME

Finding a set of similar Objects covering at least a CPU set -

### Functions

static inline **hwloc\_obj\_t** **hwloc\_get\_next\_obj\_covering\_cpuset\_by\_depth** (**hwloc\_topology\_t** topology, **hwloc\_const\_cpuset\_t** set, unsigned depth, **hwloc\_obj\_t** prev)\
 static inline **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)\

## Function Documentation

### static inline hwloc\_obj\_t hwloc\_get\_next\_obj\_covering\_cpuset\_by\_depth (hwloc\_topology\_ttopology, hwloc\_const\_cpuset\_tset, unsigneddepth, hwloc\_obj\_tprev)` [static]`

Iterate through same-depth objects covering at least CPU set `set`. If object `prev` is `NULL`, return the first object at depth `depth` covering at least part of 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`.

**Note:**

This function cannot work if objects at the given depth do not have CPU sets or if the topology is made of different machines.

### static inline hwloc\_obj\_t hwloc\_get\_next\_obj\_covering\_cpuset\_by\_type (hwloc\_topology\_ttopology, hwloc\_const\_cpuset\_tset, hwloc\_obj\_type\_ttype, hwloc\_obj\_tprev)` [static]`

Iterate through same-type objects covering at least CPU set `set`. If object `prev` is `NULL`, return the first object of type `type` covering at least part of 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`.

If there are no or multiple depths for type `type`, `NULL` is returned. The caller may fallback to **hwloc\_get\_next\_obj\_covering\_cpuset\_by\_depth()** for each depth.

**Note:**

This function cannot work if objects of the given type do not have CPU sets or if the topology is made of different machines.

## Author

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