.TH "hwlocality_distances_add" 3 "Mon Feb 22 2021" "Version 2.4.1" "Hardware Locality (hwloc)" \" -*- nroff -*- .ad l .nh .SH NAME hwlocality_distances_add \- Add or remove distances between objects .SH SYNOPSIS .br .PP .SS "Enumerations" .in +1c .ti -1c .RI "enum \fBhwloc_distances_add_flag_e\fP { \fBHWLOC_DISTANCES_ADD_FLAG_GROUP\fP, \fBHWLOC_DISTANCES_ADD_FLAG_GROUP_INACCURATE\fP }" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "int \fBhwloc_distances_add\fP (\fBhwloc_topology_t\fP topology, unsigned nbobjs, \fBhwloc_obj_t\fP *objs, hwloc_uint64_t *values, unsigned long kind, unsigned long flags)" .br .ti -1c .RI "int \fBhwloc_distances_remove\fP (\fBhwloc_topology_t\fP topology)" .br .ti -1c .RI "int \fBhwloc_distances_remove_by_depth\fP (\fBhwloc_topology_t\fP topology, int depth)" .br .ti -1c .RI "static int \fBhwloc_distances_remove_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)" .br .ti -1c .RI "int \fBhwloc_distances_release_remove\fP (\fBhwloc_topology_t\fP topology, struct \fBhwloc_distances_s\fP *distances)" .br .in -1c .SH "Detailed Description" .PP .SH "Enumeration Type Documentation" .PP .SS "enum \fBhwloc_distances_add_flag_e\fP" .PP Flags for adding a new distances to a topology\&. .PP \fBEnumerator\fP .in +1c .TP \fB\fIHWLOC_DISTANCES_ADD_FLAG_GROUP \fP\fP Try to group objects based on the newly provided distance information\&. .TP \fB\fIHWLOC_DISTANCES_ADD_FLAG_GROUP_INACCURATE \fP\fP If grouping, consider the distance values as inaccurate and relax the comparisons during the grouping algorithms\&. The actual accuracy may be modified through the HWLOC_GROUPING_ACCURACY environment variable (see \fBEnvironment Variables\fP)\&. .SH "Function Documentation" .PP .SS "int hwloc_distances_add (\fBhwloc_topology_t\fP topology, unsigned nbobjs, \fBhwloc_obj_t\fP * objs, hwloc_uint64_t * values, unsigned long kind, unsigned long flags)" .PP Provide a new distance matrix\&. Provide the matrix of distances between a set of objects given by \fCnbobjs\fP and the \fCobjs\fP array\&. \fCnbobjs\fP must be at least 2\&. The distances are stored as a one-dimension array in \fCvalues\fP\&. The distance from object i to object j is in slot i*nbobjs+j\&. .PP \fCkind\fP specifies the kind of distance as a OR'ed set of \fBhwloc_distances_kind_e\fP\&. Kind \fBHWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES\fP will be automatically added if objects of different types are given\&. .PP \fCflags\fP configures the behavior of the function using an optional OR'ed set of \fBhwloc_distances_add_flag_e\fP\&. .SS "int hwloc_distances_release_remove (\fBhwloc_topology_t\fP topology, struct \fBhwloc_distances_s\fP * distances)" .PP Release and remove the given distance matrice from the topology\&. This function includes a call to \fBhwloc_distances_release()\fP\&. .SS "int hwloc_distances_remove (\fBhwloc_topology_t\fP topology)" .PP Remove all distance matrices from a topology\&. Remove all distance matrices, either provided by the user or gathered through the OS\&. .PP If these distances were used to group objects, these additional Group objects are not removed from the topology\&. .SS "int hwloc_distances_remove_by_depth (\fBhwloc_topology_t\fP topology, int depth)" .PP Remove distance matrices for objects at a specific depth in the topology\&. Identical to \fBhwloc_distances_remove()\fP but only applies to one level of the topology\&. .SS "static int hwloc_distances_remove_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)\fC [inline]\fP, \fC [static]\fP" .PP Remove distance matrices for objects of a specific type in the topology\&. Identical to \fBhwloc_distances_remove()\fP but only applies to one level of the topology\&. .SH "Author" .PP Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.