---
name: "hwloc_distances_remove_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_distances_remove"
---

# hwloc\_distances\_remove\_by\_depth(3)

Remove distances between objects

Part of [hwlocality\_distances\_remove(3)](/hwlocality_distances_remove/3.md).

## NAME

hwlocality\_distances\_remove - Remove distances between objects

## SYNOPSIS

### Functions

int **hwloc\_distances\_remove** (**hwloc\_topology\_t** topology)\
 int **hwloc\_distances\_remove\_by\_depth** (**hwloc\_topology\_t** topology, int depth)\
 int **hwloc\_distances\_remove\_by\_type** (**hwloc\_topology\_t** topology, **hwloc\_obj\_type\_t** type)\
 int **hwloc\_distances\_release\_remove** (**hwloc\_topology\_t** topology, struct **hwloc\_distances\_s** \*distances)\

## Detailed Description

## Function Documentation

### int hwloc\_distances\_release\_remove (hwloc\_topology\_t topology, struct hwloc\_distances\_s \* distances)

Release and remove the given distance matrice from the topology. This function includes a call to **hwloc\_distances\_release()**.

**Returns**

0 on success, -1 on error.

### int hwloc\_distances\_remove (hwloc\_topology\_t topology)

Remove all distance matrices from a topology. Remove all distance matrices, either provided by the user or gathered through the OS.

If these distances were used to group objects, these additional Group objects are not removed from the topology.

**Returns**

0 on success, -1 on error.

### int hwloc\_distances\_remove\_by\_depth (hwloc\_topology\_t topology, int depth)

Remove distance matrices for objects at a specific depth in the topology. Identical to **hwloc\_distances\_remove()** but only applies to one level of the topology.

**Returns**

0 on success, -1 on error.

### int hwloc\_distances\_remove\_by\_type (hwloc\_topology\_t topology, hwloc\_obj\_type\_t type) \[inline\]

Remove distance matrices for objects of a specific type in the topology. Identical to **hwloc\_distances\_remove()** but only applies to one level of the topology.

**Returns**

0 on success, -1 on error.

## Author

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