| 
      
      
        
          | 
|  |  | HWLOC_DECLSPEC unsigned | hwloc_get_closest_objs (hwloc_topology_t topology, hwloc_obj_t src, hwloc_obj_t *__hwloc_restrict objs, unsigned max) |  |  |  | static __hwloc_inline hwloc_obj_t | hwloc_get_obj_below_by_type (hwloc_topology_t topology, hwloc_obj_type_t type1, unsigned idx1, hwloc_obj_type_t type2, unsigned idx2) __hwloc_attribute_pure |  |  |  | static __hwloc_inline hwloc_obj_t | hwloc_get_obj_below_array_by_type (hwloc_topology_t topology, int nr, hwloc_obj_type_t *typev, unsigned *idxv) __hwloc_attribute_pure |  |  |  Be sure to see the figure in termsanddefs that shows a complete topology tree, including depths, child/sibling/cousin relationships, and an example of an asymmetric topology where one socket has fewer caches than its peers.  
Do a depth-first traversal of the topology to find and sort.  all objects that are at the same depth than src. Report inobjsup tomaxphysically closest ones tosrc. Returnsthe number of objects returned in objs.
0 if srcis an I/O object.
 NoteThis function requires the srcobject to have a CPU set.
 
Find an object below a chain of objects specified by types and indexes.  This is a generalized version of hwloc_get_obj_below_by_type(). Arrays typevandidxvmust containnrtypes and indexes. Start from the top system object and walk the arrays typevandidxv. For each type and logical index couple in the arrays, look under the previously found object to find the index-th object of the given type. Indexes are specified within the parent, not withing the entire system. For instance, if nr is 3, typev contains NODE, SOCKET and CORE, and idxv contains 0, 1 and 2, return the third core object below the second socket below the first NUMA node. NoteThis function requires all these objects and the root object to have a CPU set. 
 
Find an object below another object, both specified by types and indexes.  Start from the top system object and find object of type type1and logical indexidx1. Then look below this object and find another object of typetype2and logical indexidx2. Indexes are specified within the parent, not withing the entire system. For instance, if type1 is SOCKET, idx1 is 2, type2 is CORE and idx2 is 3, return the fourth core object below the third socket. NoteThis function requires these objects to have a CPU set. 
 |  |