Skip to content

Commit 20c3173

Browse files
committed
API: clarification of depth vs special levels
Signed-off-by: Brice Goglin <[email protected]>
1 parent a10985c commit 20c3173

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

include/hwloc.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,9 @@ HWLOC_DECLSPEC void hwloc_topology_check(hwloc_topology_t topology);
668668
/** \brief Get the depth of the hierarchical tree of objects.
669669
*
670670
* This is the depth of ::HWLOC_OBJ_PU objects plus one.
671+
*
672+
* \note I/O and Misc objects are ignored when computing the depth
673+
* of the tree (they are placed on special levels).
671674
*/
672675
HWLOC_DECLSPEC unsigned hwloc_topology_get_depth(hwloc_topology_t __hwloc_restrict topology) __hwloc_attribute_pure;
673676

@@ -683,8 +686,8 @@ HWLOC_DECLSPEC unsigned hwloc_topology_get_depth(hwloc_topology_t __hwloc_restri
683686
* If ::HWLOC_OBJ_GROUP is given, the function may return ::HWLOC_TYPE_DEPTH_MULTIPLE
684687
* if multiple levels of Groups exist.
685688
*
686-
* If an I/O object type is given, the function returns a virtual value
687-
* because I/O objects are stored in special levels that are not CPU-related.
689+
* If an I/O or Misc object type or is given, the function returns a virtual value
690+
* because these objects are stored in special levels that are not CPU-related.
688691
* This virtual depth may be passed to other hwloc functions such as
689692
* hwloc_get_obj_by_depth() but it should not be considered as an actual
690693
* depth by the application. In particular, it should not be compared with

0 commit comments

Comments
 (0)