.TH "hwlocality_helper_find_inside" 3 "Fri Feb 8 2019" "Version 1.11.12" "Hardware Locality (hwloc)" \" -*- nroff -*- .ad l .nh .SH NAME hwlocality_helper_find_inside .SH SYNOPSIS .br .PP .SS "Functions" .in +1c .ti -1c .RI "static \fBhwloc_obj_t\fP \fBhwloc_get_first_largest_obj_inside_cpuset\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set)" .br .ti -1c .RI "int \fBhwloc_get_largest_objs_inside_cpuset\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_t\fP *restrict objs, int max)" .br .ti -1c .RI "static \fBhwloc_obj_t\fP \fBhwloc_get_next_obj_inside_cpuset_by_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth, \fBhwloc_obj_t\fP prev)" .br .ti -1c .RI "static \fBhwloc_obj_t\fP \fBhwloc_get_next_obj_inside_cpuset_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)" .br .ti -1c .RI "static \fBhwloc_obj_t\fP \fBhwloc_get_obj_inside_cpuset_by_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth, unsigned idx)" .br .ti -1c .RI "static \fBhwloc_obj_t\fP \fBhwloc_get_obj_inside_cpuset_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, unsigned idx)" .br .ti -1c .RI "static unsigned \fBhwloc_get_nbobjs_inside_cpuset_by_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth)" .br .ti -1c .RI "static int \fBhwloc_get_nbobjs_inside_cpuset_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type)" .br .ti -1c .RI "static int \fBhwloc_get_obj_index_inside_cpuset\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_t\fP obj)" .br .in -1c .SH "Detailed Description" .PP .SH "Function Documentation" .PP .SS "static \fBhwloc_obj_t\fP hwloc_get_first_largest_obj_inside_cpuset (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set)\fC [inline]\fP, \fC [static]\fP" .PP Get the first largest object included in the given cpuset \fCset\fP\&. .PP \fBReturns:\fP .RS 4 the first object that is included in \fCset\fP and whose parent is not\&. .RE .PP 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\&. .PP \fBNote:\fP .RS 4 This function cannot work if the root object does not have a CPU set, e\&.g\&. if the topology is made of different machines\&. .RE .PP .SS "int hwloc_get_largest_objs_inside_cpuset (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_t\fP *restrict objs, int max)" .PP Get the set of largest objects covering exactly a given cpuset \fCset\fP\&. .PP \fBReturns:\fP .RS 4 the number of objects returned in \fCobjs\fP\&. .RE .PP \fBNote:\fP .RS 4 This function cannot work if the root object does not have a CPU set, e\&.g\&. if the topology is made of different machines\&. .RE .PP .SS "static unsigned hwloc_get_nbobjs_inside_cpuset_by_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth)\fC [inline]\fP, \fC [static]\fP" .PP Return the number of objects at depth \fCdepth\fP included in CPU set \fCset\fP\&. .PP \fBNote:\fP .RS 4 Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set)\&. .PP This function cannot work if objects at the given depth do not have CPU sets or if the topology is made of different machines\&. .RE .PP .SS "static int hwloc_get_nbobjs_inside_cpuset_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type)\fC [inline]\fP, \fC [static]\fP" .PP Return the number of objects of type \fCtype\fP included in CPU set \fCset\fP\&. If no object for that type exists inside CPU set \fCset\fP, 0 is returned\&. If there are several levels with objects of that type inside CPU set \fCset\fP, -1 is returned\&. .PP \fBNote:\fP .RS 4 Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set)\&. .PP This function cannot work if objects of the given type do not have CPU sets or if the topology is made of different machines\&. .RE .PP .SS "static \fBhwloc_obj_t\fP hwloc_get_next_obj_inside_cpuset_by_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth, \fBhwloc_obj_t\fP prev)\fC [inline]\fP, \fC [static]\fP" .PP Return the next object at depth \fCdepth\fP included in CPU set \fCset\fP\&. If \fCprev\fP is \fCNULL\fP, return the first object at depth \fCdepth\fP included in \fCset\fP\&. The next invokation should pass the previous return value in \fCprev\fP so as to obtain the next object in \fCset\fP\&. .PP \fBNote:\fP .RS 4 Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set)\&. .PP This function cannot work if objects at the given depth do not have CPU sets or if the topology is made of different machines\&. .RE .PP .SS "static \fBhwloc_obj_t\fP hwloc_get_next_obj_inside_cpuset_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)\fC [inline]\fP, \fC [static]\fP" .PP Return the next object of type \fCtype\fP included in CPU set \fCset\fP\&. If there are multiple or no depth for given type, return \fCNULL\fP and let the caller fallback to \fBhwloc_get_next_obj_inside_cpuset_by_depth()\fP\&. .PP \fBNote:\fP .RS 4 Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set)\&. .PP This function cannot work if objects of the given type do not have CPU sets or if the topology is made of different machines\&. .RE .PP .SS "static int hwloc_get_obj_index_inside_cpuset (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_t\fP obj)\fC [inline]\fP, \fC [static]\fP" .PP Return the logical index among the objects included in CPU set \fCset\fP\&. Consult all objects in the same level as \fCobj\fP and inside CPU set \fCset\fP in the logical order, and return the index of \fCobj\fP within them\&. If \fCset\fP covers the entire topology, this is the logical index of \fCobj\fP\&. Otherwise, this is similar to a logical index within the part of the topology defined by CPU set \fCset\fP\&. .PP \fBNote:\fP .RS 4 Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set)\&. .RE .PP .SS "static \fBhwloc_obj_t\fP hwloc_get_obj_inside_cpuset_by_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth, unsigned idx)\fC [inline]\fP, \fC [static]\fP" .PP Return the (logically) \fCidx\fP -th object at depth \fCdepth\fP included in CPU set \fCset\fP\&. .PP \fBNote:\fP .RS 4 Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set)\&. .PP This function cannot work if objects at the given depth do not have CPU sets or if the topology is made of different machines\&. .RE .PP .SS "static \fBhwloc_obj_t\fP hwloc_get_obj_inside_cpuset_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, unsigned idx)\fC [inline]\fP, \fC [static]\fP" .PP Return the \fCidx\fP -th object of type \fCtype\fP included in CPU set \fCset\fP\&. If there are multiple or no depth for given type, return \fCNULL\fP and let the caller fallback to \fBhwloc_get_obj_inside_cpuset_by_depth()\fP\&. .PP \fBNote:\fP .RS 4 Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set)\&. .PP This function cannot work if objects of the given type do not have CPU sets or if the topology is made of different machines\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.