Open MPI logo

Portable Hardware Locality (hwloc) Documentation: v0.9.3

  |   Home   |   Support   |   FAQ   |  

helper.h File Reference

High-level hwloc traversal helpers. More...

#include <stdlib.h>
#include <errno.h>

Go to the source code of this file.

Functions

static inline unsigned hwloc_get_type_or_below_depth (hwloc_topology_t topology, hwloc_obj_type_t type)
 Returns the depth of objects of type type or below.
static inline unsigned hwloc_get_type_or_above_depth (hwloc_topology_t topology, hwloc_obj_type_t type)
 Returns the depth of objects of type type or above.
static inline hwloc_obj_t hwloc_get_system_obj (hwloc_topology_t topology)
 Returns the top-object of the topology-tree. Its type is HWLOC_OBJ_SYSTEM.
static inline hwloc_obj_t hwloc_get_next_obj_by_depth (hwloc_topology_t topology, unsigned depth, hwloc_obj_t prev)
 Returns the next object at depth depth.
static inline hwloc_obj_t hwloc_get_next_obj_by_type (hwloc_topology_t topology, hwloc_obj_type_t type, hwloc_obj_t prev)
 Returns the next object of type type.
static inline hwloc_obj_t hwloc_get_next_child (hwloc_topology_t topology, hwloc_obj_t father, hwloc_obj_t prev)
 Return the next child.
static inline hwloc_obj_t hwloc_get_common_ancestor_obj (hwloc_topology_t topology, hwloc_obj_t obj1, hwloc_obj_t obj2)
 Returns the common father object to objects lvl1 and lvl2.
static inline int hwloc_obj_is_in_subtree (hwloc_topology_t topology, hwloc_obj_t obj, hwloc_obj_t subtree_root)
 Returns true if _obj_ is inside the subtree beginning with subtree_root.
int hwloc_get_largest_objs_inside_cpuset (hwloc_topology_t topology, hwloc_cpuset_t set, hwloc_obj_t *restrict objs, int max)
 Get the set of largest objects covering exactly a given cpuset set.
static inline hwloc_obj_t hwloc_get_next_obj_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_cpuset_t set, unsigned depth, hwloc_obj_t prev)
 Return the next object at depth depth included in CPU set set.
static inline hwloc_obj_t hwloc_get_next_obj_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_cpuset_t set, hwloc_obj_type_t type, hwloc_obj_t prev)
 Return the next object of type type included in CPU set set.
static inline hwloc_obj_t hwloc_get_obj_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_cpuset_t set, unsigned depth, unsigned idx)
 Return the index -th object at depth depth included in CPU set set.
static inline hwloc_obj_t hwloc_get_obj_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_cpuset_t set, hwloc_obj_type_t type, unsigned idx)
 Return the idx -th object of type type included in CPU set set.
static inline unsigned hwloc_get_nbobjs_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_cpuset_t set, unsigned depth)
 Return the number of objects at depth depth included in CPU set set.
static inline int hwloc_get_nbobjs_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_cpuset_t set, hwloc_obj_type_t type)
 Return the number of objects of type type included in CPU set set.
static inline hwloc_obj_t hwloc_get_child_covering_cpuset (hwloc_topology_t topology, hwloc_cpuset_t set, hwloc_obj_t father)
 Get the child covering at least CPU set set.
static inline hwloc_obj_t hwloc_get_obj_covering_cpuset (hwloc_topology_t topology, hwloc_cpuset_t set)
 Get the lowest object covering at least CPU set set.
static inline hwloc_obj_t hwloc_get_next_obj_covering_cpuset_by_depth (hwloc_topology_t topology, hwloc_cpuset_t set, unsigned depth, hwloc_obj_t prev)
 Iterate through same-depth objects covering at least CPU set set.
static inline hwloc_obj_t hwloc_get_next_obj_covering_cpuset_by_type (hwloc_topology_t topology, hwloc_cpuset_t set, hwloc_obj_type_t type, hwloc_obj_t prev)
 Iterate through same-type objects covering at least CPU set set.
static inline hwloc_obj_t hwloc_get_cache_covering_cpuset (hwloc_topology_t topology, hwloc_cpuset_t set)
 Get the first cache covering a cpuset set.
static inline hwloc_obj_t hwloc_get_shared_cache_covering_obj (hwloc_topology_t topology, hwloc_obj_t obj)
 Get the first cache shared between an object and somebody else.
int hwloc_get_closest_objs (hwloc_topology_t topology, hwloc_obj_t src, hwloc_obj_t *restrict objs, int max)
 Do a depth-first traversal of the topology to find and sort.
static inline void hwloc_distribute (hwloc_topology_t topology, hwloc_obj_t root, hwloc_cpuset_t *cpuset, int n)
 Distribute n items over the topology under root.

Detailed Description

High-level hwloc traversal helpers.