.TH "hwlocality_distances" 3 "Fri Apr 28 2017" "Version 1.11.7" "Hardware Locality (hwloc)" \" -*- nroff -*- .ad l .nh .SH NAME hwlocality_distances .SH SYNOPSIS .br .PP .SS "Functions" .in +1c .ti -1c .RI "static const struct \fBhwloc_distances_s\fP * \fBhwloc_get_whole_distance_matrix_by_depth\fP (\fBhwloc_topology_t\fP topology, unsigned depth)" .br .ti -1c .RI "static const struct \fBhwloc_distances_s\fP * \fBhwloc_get_whole_distance_matrix_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)" .br .ti -1c .RI "static const struct \fBhwloc_distances_s\fP * \fBhwloc_get_distance_matrix_covering_obj_by_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_t\fP obj, unsigned depth, unsigned *firstp)" .br .ti -1c .RI "static int \fBhwloc_get_latency\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_t\fP obj1, \fBhwloc_obj_t\fP obj2, float *latency, float *reverse_latency)" .br .in -1c .SH "Detailed Description" .PP .SH "Function Documentation" .PP .SS "static const struct \fBhwloc_distances_s\fP* hwloc_get_distance_matrix_covering_obj_by_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_t\fP obj, unsigned depth, unsigned * firstp)\fC [static]\fP" .PP Get distances for the given depth and covering some objects\&. Return a distance matrix that describes depth \fCdepth\fP and covers at least object \fCobj\fP and all its children\&. .PP When looking for the distance between some objects, a common ancestor should be passed in \fCobj\fP\&. .PP \fCfirstp\fP is set to logical index of the first object described by the matrix\&. .PP The returned structure belongs to the hwloc library\&. The caller should not modify or free it\&. .SS "static int hwloc_get_latency (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_t\fP obj1, \fBhwloc_obj_t\fP obj2, float * latency, float * reverse_latency)\fC [inline]\fP, \fC [static]\fP" .PP Get the latency in both directions between two objects\&. Look at ancestor objects from the bottom to the top until one of them contains a distance matrix that matches the objects exactly\&. .PP \fClatency\fP gets the value from object \fCobj1\fP to \fCobj2\fP, while \fCreverse_latency\fP gets the reverse-direction value, which may be different on some architectures\&. .PP \fBReturns:\fP .RS 4 -1 if no ancestor contains a matching latency matrix\&. .RE .PP .SS "static const struct \fBhwloc_distances_s\fP* hwloc_get_whole_distance_matrix_by_depth (\fBhwloc_topology_t\fP topology, unsigned depth)\fC [static]\fP" .PP Get the distances between all objects at the given depth\&. .PP \fBReturns:\fP .RS 4 a distances structure containing a matrix with all distances between all objects at the given depth\&. .RE .PP Slot i+nbobjs*j contains the distance from the object of logical index i the object of logical index j\&. .PP \fBNote:\fP .RS 4 This function only returns matrices covering the whole topology, without any unknown distance value\&. Those matrices are available in top-level object of the hierarchy\&. Matrices of lower objects are not reported here since they cover only part of the machine\&. .RE .PP The returned structure belongs to the hwloc library\&. The caller should not modify or free it\&. .PP \fBReturns:\fP .RS 4 \fCNULL\fP if no such distance matrix exists\&. .RE .PP .SS "static const struct \fBhwloc_distances_s\fP* hwloc_get_whole_distance_matrix_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)\fC [static]\fP" .PP Get the distances between all objects of a given type\&. .PP \fBReturns:\fP .RS 4 a distances structure containing a matrix with all distances between all objects of the given type\&. .RE .PP Slot i+nbobjs*j contains the distance from the object of logical index i the object of logical index j\&. .PP \fBNote:\fP .RS 4 This function only returns matrices covering the whole topology, without any unknown distance value\&. Those matrices are available in top-level object of the hierarchy\&. Matrices of lower objects are not reported here since they cover only part of the machine\&. .RE .PP The returned structure belongs to the hwloc library\&. The caller should not modify or free it\&. .PP \fBReturns:\fP .RS 4 \fCNULL\fP if no such distance matrix exists\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.