hwloc_distances_s(3) Hardware Locality (hwloc) hwloc_distances_s(3)NAME
hwloc_distances_s -
SYNOPSIS
#include <hwloc.h>
Data Fields
unsigned relative_depth
unsigned nbobjs
float * latency
float latency_max
float latency_base
Detailed Description
Distances between objects.
One object may contain a distance structure describing distances between all its descendants at a given relative depth. If the containing
object is the root object of the topology, then the distances are available for all objects in the machine.
If the latency pointer is not NULL, the pointed array contains memory latencies (non-zero values), as defined by the ACPI SLIT
specification.
In the future, some other types of distances may be considered. In these cases, latency may be NULL.
Field Documentation
float* hwloc_distances_s::latency
Matrix of latencies between objects, stored as a one-dimension array. May be NULL if the distances considered here are not latencies.
Values are normalized to get 1.0 as the minimal value in the matrix. Latency from i-th to j-th object is stored in slot i*nbobjs+j.
float hwloc_distances_s::latency_base
The multiplier that should be applied to latency matrix to retrieve the original OS-provided latencies. Usually 10 on Linux since ACPI SLIT
uses 10 for local latency.
float hwloc_distances_s::latency_max
The maximal value in the latency matrix.
unsigned hwloc_distances_s::nbobjs
Number of objects considered in the matrix. It is the number of descendant objects at relative_depth below the containing object. It
corresponds to the result of hwloc_get_nbobjs_inside_cpuset_by_depth.
unsigned hwloc_distances_s::relative_depth
Relative depth of the considered objects below the object containing this distance information.
Author
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code.
Version 1.4.1 Mon Feb 27 2012 hwloc_distances_s(3)
Check Out this Related Man Page
Distances(3) Hardware Locality (hwloc) Distances(3)NAME
Distances -
Functions
static inline struct
hwloc_distances_s * hwloc_get_whole_distance_matrix_by_depth (hwloc_topology_t topology, unsigned depth)"
static inline struct
hwloc_distances_s * hwloc_get_whole_distance_matrix_by_type (hwloc_topology_t topology, hwloc_obj_type_t type)"
static inline struct
hwloc_distances_s * hwloc_get_distance_matrix_covering_obj_by_depth (hwloc_topology_t topology, hwloc_obj_t obj, unsigned depth,
unsigned *firstp)"
static inline int hwloc_get_latency (hwloc_topology_t topology, hwloc_obj_t obj1, hwloc_obj_t obj2, float *latency, float *reverse_latency)
Detailed DescriptionFunction Documentation
static inline struct hwloc_distances_s* hwloc_get_distance_matrix_covering_obj_by_depth (hwloc_topology_ttopology, hwloc_obj_tobj,
unsigneddepth, unsigned *firstp) [static], [read]
Get distances for the given depth and covering some objects. Return a distance matrix that describes depth depth and covers at least object
obj and all its children.
When looking for the distance between some objects, a common ancestor should be passed in obj.
firstp is set to logical index of the first object described by the matrix.
The returned structure belongs to the hwloc library. The caller should not modify or free it.
static inline int hwloc_get_latency (hwloc_topology_ttopology, hwloc_obj_tobj1, hwloc_obj_tobj2, float *latency, float *reverse_latency)
[static]
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.
latency gets the value from object obj1 to obj2, while reverse_latency gets the reverse-direction value, which may be different on some
architectures.
Returns:
-1 if no ancestor contains a matching latency matrix.
static inline struct hwloc_distances_s* hwloc_get_whole_distance_matrix_by_depth (hwloc_topology_ttopology, unsigneddepth) [static], [read]
Get the distances between all objects at the given depth. Returns:
a distances structure containing a matrix with all distances between all objects at the given depth.
Slot i+nbobjs*j contains the distance from the object of logical index i the object of logical index j.
Note:
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.
The returned structure belongs to the hwloc library. The caller should not modify or free it.
Returns:
NULL if no such distance matrix exists.
static inline struct hwloc_distances_s* hwloc_get_whole_distance_matrix_by_type (hwloc_topology_ttopology, hwloc_obj_type_ttype) [static],
[read]
Get the distances between all objects of a given type. Returns:
a distances structure containing a matrix with all distances between all objects of the given type.
Slot i+nbobjs*j contains the distance from the object of logical index i the object of logical index j.
Note:
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.
The returned structure belongs to the hwloc library. The caller should not modify or free it.
Returns:
NULL if no such distance matrix exists.
Author
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code.
Version 1.7 Sun Apr 7 2013 Distances(3)