OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

Functions
Finding Objects Inside a CPU set

## Functions
static __hwloc_inline hwloc_obj_t | hwloc_get_first_largest_obj_inside_cpuset (hwloc_topology_t topology, hwloc_const_cpuset_t set)
| Get the first largest object included in the given cpuset `set`. More...
HWLOC_DECLSPEC int | hwloc_get_largest_objs_inside_cpuset (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_t *__hwloc_restrict objs, int max)
| Get the set of largest objects covering exactly a given cpuset `set`. More...
static __hwloc_inline hwloc_obj_t | hwloc_get_next_obj_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth, hwloc_obj_t prev)
| Return the next object at depth `depth` included in CPU set `set`. More...
static __hwloc_inline 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)
| Return the next object of type `type` included in CPU set `set`. More...
static __hwloc_inline hwloc_obj_t __hwloc_attribute_pure | hwloc_get_obj_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth, unsigned idx)
| Return the (logically) `idx` -th object at depth `depth` included in CPU set `set`.
static __hwloc_inline hwloc_obj_t __hwloc_attribute_pure | hwloc_get_obj_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type, unsigned idx)
| Return the `idx` -th object of type `type` included in CPU set `set`. More...
static __hwloc_inline unsigned __hwloc_attribute_pure | hwloc_get_nbobjs_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth)
| Return the number of objects at depth `depth` included in CPU set `set`. More...
static __hwloc_inline int __hwloc_attribute_pure | hwloc_get_nbobjs_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type)
| Return the number of objects of type `type` included in CPU set `set`. More...

## Detailed Description

## Function Documentation

static __hwloc_inline hwloc_obj_t hwloc_get_first_largest_obj_inside_cpuset | ( | hwloc_topology_t | topology,
|  | hwloc_const_cpuset_t | set
| ) |  |
| 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.

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.

References hwloc_obj::cpuset, hwloc_bitmap_intersects(), hwloc_bitmap_isincluded(), hwloc_get_next_child(), and hwloc_get_root_obj().

HWLOC_DECLSPEC int hwloc_get_largest_objs_inside_cpuset | ( | hwloc_topology_t | topology,
|  | hwloc_const_cpuset_t | set,
|  | hwloc_obj_t *__hwloc_restrict | objs,
|  | int | max
| ) |  |

Get the set of largest objects covering exactly a given cpuset `set`.

Returns
  the number of objects returned in `objs`.

static __hwloc_inline unsigned __hwloc_attribute_pure hwloc_get_nbobjs_inside_cpuset_by_depth | ( | hwloc_topology_t | topology,
|  | hwloc_const_cpuset_t | set,
|  | unsigned | depth
| ) |  |
| static

Return the number of objects at depth `depth` included in CPU set `set`.

References hwloc_obj::cpuset, hwloc_bitmap_isincluded(), hwloc_get_obj_by_depth(), and hwloc_obj::next_cousin.

Referenced by hwloc_get_nbobjs_inside_cpuset_by_type().

static __hwloc_inline int __hwloc_attribute_pure hwloc_get_nbobjs_inside_cpuset_by_type | ( | hwloc_topology_t | topology,
|  | hwloc_const_cpuset_t | set,
|  | hwloc_obj_type_t | type
| ) |  |
| static

Return the number of objects of type `type` included in CPU set `set`.

If no object for that type exists inside CPU set `set`, 0 is returned. If there are several levels with objects of that type inside CPU set `set`, -1 is returned.

References hwloc_get_nbobjs_inside_cpuset_by_depth(), hwloc_get_type_depth(), HWLOC_TYPE_DEPTH_MULTIPLE, and HWLOC_TYPE_DEPTH_UNKNOWN.

static __hwloc_inline hwloc_obj_t hwloc_get_next_obj_inside_cpuset_by_depth | ( | hwloc_topology_t | topology,
|  | hwloc_const_cpuset_t | set,
|  | unsigned | depth,
|  | hwloc_obj_t | prev
| ) |  |
| static

Return the next object at depth `depth` included in CPU set `set`.

If `prev` is `NULL`, return the first object at depth `depth` included in `set`. The next invokation should pass the previous return value in `prev` so as to obtain the next object in `set`.

References hwloc_obj::cpuset, hwloc_bitmap_isincluded(), hwloc_get_next_obj_by_depth(), and hwloc_obj::next_cousin.

Referenced by hwloc_get_distance_matrix_covering_obj_by_depth(), and hwloc_get_next_obj_inside_cpuset_by_type().

static __hwloc_inline 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

Return the next object of type `type` included in CPU set `set`.

If there are multiple or no depth for given type, return `NULL` and let the caller fallback to hwloc_get_next_obj_inside_cpuset_by_depth().

References hwloc_get_next_obj_inside_cpuset_by_depth(), hwloc_get_type_depth(), HWLOC_TYPE_DEPTH_MULTIPLE, and HWLOC_TYPE_DEPTH_UNKNOWN.

static __hwloc_inline hwloc_obj_t __hwloc_attribute_pure hwloc_get_obj_inside_cpuset_by_type | ( | hwloc_topology_t | topology,
|  | hwloc_const_cpuset_t | set,
|  | hwloc_obj_type_t | type,
|  | unsigned | idx
| ) |  |
| static

Return the `idx` -th object of type `type` included in CPU set `set`.

If there are multiple or no depth for given type, return `NULL` and let the caller fallback to hwloc_get_obj_inside_cpuset_by_depth().

References hwloc_get_obj_inside_cpuset_by_depth(), hwloc_get_type_depth(), HWLOC_TYPE_DEPTH_MULTIPLE, and HWLOC_TYPE_DEPTH_UNKNOWN.

Referenced by hwloc_get_obj_below_array_by_type(), and hwloc_get_obj_below_by_type().