hwlocality_helper_find_inside - Man Page
Finding Objects inside a CPU set
Synopsis
Functions
static hwloc_obj_t hwloc_get_first_largest_obj_inside_cpuset (hwloc_topology_t topology, hwloc_const_cpuset_t set)
int hwloc_get_largest_objs_inside_cpuset (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_t *restrict objs, int max)
static hwloc_obj_t hwloc_get_next_obj_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_const_cpuset_t set, int depth, hwloc_obj_t prev)
static hwloc_obj_t hwloc_get_next_obj_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type, hwloc_obj_t prev)
static hwloc_obj_t hwloc_get_obj_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_const_cpuset_t set, int depth, unsigned idx)
static hwloc_obj_t hwloc_get_obj_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type, unsigned idx)
static unsigned hwloc_get_nbobjs_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_const_cpuset_t set, int depth)
static int hwloc_get_nbobjs_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type)
static int hwloc_get_obj_index_inside_cpuset (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_t obj)
Detailed Description
Function Documentation
static hwloc_obj_t hwloc_get_first_largest_obj_inside_cpuset (hwloc_topology_t topology, hwloc_const_cpuset_t set) [inline], [static]
Get the first largest object included in the given cpuset set
.
- Returns
the first object that is included in
set
and whose parent is not.NULL
if no such object exists.
This is convenient for iterating over all largest objects within a CPU set by doing a loop getting the first largest object and clearing its CPU set from the remaining CPU set.
int hwloc_get_largest_objs_inside_cpuset (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_t *restrict objs, int max)
Get the set of largest objects covering exactly a given cpuset set
.
- Returns
the number of objects returned in
objs
.-1 if no set of objects may cover that cpuset.
static unsigned hwloc_get_nbobjs_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_const_cpuset_t set, int depth) [inline], [static]
Return the number of objects at depth depth
included in CPU set set
.
- Returns
the number of objects.
0 if the depth is invalid.
- Note
Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set).
This function cannot work if objects at the given depth do not have CPU sets (I/O or Misc objects).
static int hwloc_get_nbobjs_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type) [inline], [static]
Return the number of objects of type type
included in CPU set set
.
- Returns
the number of objects.
0 if there are no objects of that type in the topology.
-1 if there are multiple levels of objects of that type, the caller should fallback to hwloc_get_nbobjs_inside_cpuset_by_depth().
- Note
Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set).
This function cannot work if objects of the given type do not have CPU sets (I/O objects).
static hwloc_obj_t hwloc_get_next_obj_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_const_cpuset_t set, int depth, hwloc_obj_t prev) [inline], [static]
Return the next object at depth depth
included in CPU set set
. The next invokation should pass the previous return value in prev
so as to obtain the next object in set
.
- Returns
the first object at depth
depth
included inset
ifprev
isNULL
.the next object at depth
depth
included inset
ifprev
is notNULL
.NULL
if there is no next object.- Note
Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set).
This function cannot work if objects at the given depth do not have CPU sets (I/O or Misc objects).
static hwloc_obj_t hwloc_get_next_obj_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type, hwloc_obj_t prev) [inline], [static]
Return the next object of type type
included in CPU set set
. The next invokation should pass the previous return value in prev
so as to obtain the next object in set
.
- Returns
the first object of type
type
included inset
ifprev
isNULL
.the next object of type
type
included inset
ifprev
is notNULL
.NULL
if there is no next object.NULL
if there is no depth for the given type.NULL
if there are multiple depths for the given type, the caller should fallback to hwloc_get_next_obj_inside_cpuset_by_depth().- Note
Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set).
This function cannot work if objects of the given type do not have CPU sets (I/O or Misc objects).
static int hwloc_get_obj_index_inside_cpuset (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_t obj) [inline], [static]
Return the logical index among the objects included in CPU set set
. Consult all objects in the same level as obj
and inside CPU set set
in the logical order, and return the index of obj
within them. If set
covers the entire topology, this is the logical index of obj
. Otherwise, this is similar to a logical index within the part of the topology defined by CPU set set
.
- Returns
the logical index among the objects included in the set if any.
-1 if the object is not included in the set.
- Note
Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set).
This function cannot work if obj does not have CPU sets (I/O objects).
static hwloc_obj_t hwloc_get_obj_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_const_cpuset_t set, int depth, unsigned idx) [inline], [static]
Return the (logically) idx
-th object at depth depth
included in CPU set set
.
- Returns
the object if any,
NULL
otherwise.- Note
Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set).
This function cannot work if objects at the given depth do not have CPU sets (I/O or Misc objects).
static hwloc_obj_t hwloc_get_obj_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type, unsigned idx) [inline], [static]
Return the idx
-th object of type type
included in CPU set set
.
- Returns
the object if any.
NULL
if there is no such object.NULL
if there is no depth for given type.NULL
if there are multiple depths for given type, the caller should fallback to hwloc_get_obj_inside_cpuset_by_depth().- Note
Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set).
This function cannot work if objects of the given type do not have CPU sets (I/O or Misc objects).
Author
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code.
Referenced By
The man pages hwloc_get_first_largest_obj_inside_cpuset(3), hwloc_get_largest_objs_inside_cpuset(3), hwloc_get_nbobjs_inside_cpuset_by_depth(3), hwloc_get_nbobjs_inside_cpuset_by_type(3), hwloc_get_next_obj_inside_cpuset_by_depth(3), hwloc_get_next_obj_inside_cpuset_by_type(3), hwloc_get_obj_index_inside_cpuset(3), hwloc_get_obj_inside_cpuset_by_depth(3) and hwloc_get_obj_inside_cpuset_by_type(3) are aliases of hwlocality_helper_find_inside(3).