10 #ifndef HWLOC_DISTANCES_H 11 #define HWLOC_DISTANCES_H 14 #error Please include the main hwloc.h instead 119 unsigned long kind,
unsigned long flags);
128 unsigned long kind,
unsigned long flags);
134 static __hwloc_inline
int 137 unsigned long kind,
unsigned long flags)
163 static __hwloc_inline
int 167 for(i=0; i<distances->
nbobjs; i++)
168 if (distances->
objs[i] == obj)
180 static __hwloc_inline
int 183 hwloc_uint64_t *value1to2, hwloc_uint64_t *value2to1)
187 if (i1 < 0 || i2 < 0)
189 *value1to2 = distances->
values[i1 * distances->
nbobjs + i2];
190 *value2to1 = distances->
values[i2 * distances->
nbobjs + i1];
232 unsigned long kind,
unsigned long flags);
254 static __hwloc_inline
int hwloc_uint64_t * values
Matrix of distances between objects, stored as a one-dimension array.
Definition: distances.h:49
hwloc_distances_kind_e
Kinds of distance matrices.
Definition: distances.h:67
int hwloc_get_type_depth(hwloc_topology_t topology, hwloc_obj_type_t type)
Returns the depth of objects of type type.
int hwloc_distances_get_by_depth(hwloc_topology_t topology, int depth, unsigned *nr, struct hwloc_distances_s **distances, unsigned long kind, unsigned long flags)
Retrieve distance matrices for object at a specific depth in the topology.
If grouping, consider the distance values as inaccurate and relax the comparisons during the grouping...
Definition: distances.h:213
unsigned nbobjs
Number of objects described by the distance matrix.
Definition: distances.h:42
struct hwloc_topology * hwloc_topology_t
Topology context.
Definition: hwloc.h:637
unsigned long kind
OR'ed set of hwloc_distances_kind_e.
Definition: distances.h:48
Try to group objects based on the newly provided distance information.
Definition: distances.h:207
static int hwloc_distances_obj_index(struct hwloc_distances_s *distances, hwloc_obj_t obj)
Find the index of an object in a distances structure.
Definition: distances.h:164
Distance values are similar to latencies between objects. Values are smaller for closer objects...
Definition: distances.h:83
static int hwloc_distances_remove_by_type(hwloc_topology_t topology, hwloc_obj_type_t type)
Remove distance matrices for objects of a specific type in the topology.
Definition: distances.h:255
Objects of given type exist at different depth in the topology (only for Groups). ...
Definition: hwloc.h:768
hwloc_obj_t * objs
Array of objects described by the distance matrix. These objects are not in any particular order...
Definition: distances.h:43
static int hwloc_distances_obj_pair_values(struct hwloc_distances_s *distances, hwloc_obj_t obj1, hwloc_obj_t obj2, hwloc_uint64_t *value1to2, hwloc_uint64_t *value2to1)
Find the values between two objects in a distance matrices.
Definition: distances.h:181
int hwloc_distances_remove(hwloc_topology_t topology)
Remove all distance matrices from a topology.
These distances were obtained from the operating system or hardware.
Definition: distances.h:71
Structure of a topology object.
Definition: hwloc.h:357
hwloc_distances_add_flag_e
Flags for adding a new distances to a topology.
Definition: distances.h:203
static int hwloc_distances_get_by_type(hwloc_topology_t topology, hwloc_obj_type_t type, unsigned *nr, struct hwloc_distances_s **distances, unsigned long kind, unsigned long flags)
Retrieve distance matrices for object of a specific type.
Definition: distances.h:135
int hwloc_distances_add(hwloc_topology_t topology, unsigned nbobjs, hwloc_obj_t *objs, hwloc_uint64_t *values, unsigned long kind, unsigned long flags)
Provide a new distance matrix.
hwloc_obj_type_t
Definition: hwloc.h:176
int hwloc_distances_get(hwloc_topology_t topology, unsigned *nr, struct hwloc_distances_s **distances, unsigned long kind, unsigned long flags)
Retrieve distance matrices.
No object of given type exists in the topology.
Definition: hwloc.h:767
Distance values are similar to bandwidths between objects. Values are higher for closer objects...
Definition: distances.h:90
Matrix of distances between a set of objects.
Definition: distances.h:41
void hwloc_distances_release(hwloc_topology_t topology, struct hwloc_distances_s *distances)
Release a distance matrix structure previously returned by hwloc_distances_get(). ...
int hwloc_distances_remove_by_depth(hwloc_topology_t topology, int depth)
Remove distance matrices for objects at a specific depth in the topology.
These distances were provided by the user.
Definition: distances.h:75