Skip to content

Commit f28bcf2

Browse files
committed
hwloc.h: rewrite the doc of hwloc_get_type_depth()
Move things in \return to follow changes for #578. Similar functions aren't updated because there are too many thing to duplicate. Signed-off-by: Brice Goglin <[email protected]>
1 parent de063bd commit f28bcf2

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

include/hwloc.h

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -796,23 +796,26 @@ HWLOC_DECLSPEC int hwloc_topology_get_depth(hwloc_topology_t __hwloc_restrict to
796796

797797
/** \brief Returns the depth of objects of type \p type.
798798
*
799-
* If no object of this type is present on the underlying architecture, or if
800-
* the OS doesn't provide this kind of information, the function returns
801-
* ::HWLOC_TYPE_DEPTH_UNKNOWN.
799+
* \return The depth of objects of type \p type.
802800
*
803-
* If type is absent but a similar type is acceptable, see also
804-
* hwloc_get_type_or_below_depth() and hwloc_get_type_or_above_depth().
805-
*
806-
* If ::HWLOC_OBJ_GROUP is given, the function may return ::HWLOC_TYPE_DEPTH_MULTIPLE
807-
* if multiple levels of Groups exist.
808-
*
809-
* If a NUMA node, I/O or Misc object type is given, the function returns a virtual
810-
* value because these objects are stored in special levels that are not CPU-related.
801+
* \return A negative virtual depth if a NUMA node, I/O or Misc object type is given.
802+
* These objects are stored in special levels that are not CPU-related.
811803
* This virtual depth may be passed to other hwloc functions such as
812804
* hwloc_get_obj_by_depth() but it should not be considered as an actual
813805
* depth by the application. In particular, it should not be compared with
814806
* any other object depth or with the entire topology depth.
815-
* \sa hwloc_get_memory_parents_depth().
807+
*
808+
* \return ::HWLOC_TYPE_DEPTH_UNKNOWN
809+
* if no object of this type is present on the underlying architecture,
810+
* or if the OS doesn't provide this kind of information.
811+
*
812+
* \return ::HWLOC_TYPE_DEPTH_MULTIPLE if type ::HWLOC_OBJ_GROUP is given
813+
* and multiple levels of Groups exist.
814+
*
815+
* \note If the type is absent but a similar type is acceptable, see also
816+
* hwloc_get_type_or_below_depth() and hwloc_get_type_or_above_depth().
817+
*
818+
* \sa hwloc_get_memory_parents_depth() for managing the depth of memory objects.
816819
*
817820
* \sa hwloc_get_type_depth_with_attr() for disambiguating cases where
818821
* ::HWLOC_TYPE_DEPTH_MULTIPLE is returned.

0 commit comments

Comments
 (0)