Skip to content

Commit 63762b9

Browse files
committed
API: add notes about restrict/insert_group changing logical indexes
Can cause confusion when using different --restrict in different command-lines. Signed-off-by: Brice Goglin <[email protected]>
1 parent 383a7d9 commit 63762b9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/hwloc.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2637,6 +2637,10 @@ enum hwloc_restrict_flags_e {
26372637
*
26382638
* \p flags is a OR'ed set of ::hwloc_restrict_flags_e.
26392639
*
2640+
* \note Restricting the topology removes some locality information,
2641+
* hence the remaining objects may get reordered (including PUs and NUMA nodes),
2642+
* and their logical indexes may change.
2643+
*
26402644
* \note This call may not be reverted by restricting back to a larger
26412645
* set. Once dropped during restriction, objects may not be brought
26422646
* back, except by loading another topology with hwloc_topology_load().
@@ -2765,6 +2769,10 @@ HWLOC_DECLSPEC hwloc_obj_t hwloc_topology_alloc_group_object(hwloc_topology_t to
27652769
* as \c 0xffffffff to tell hwloc that this new Group should always
27662770
* be discarded in favor of any existing Group with the same locality.
27672771
*
2772+
* \note Inserting a group adds some locality information to the topology,
2773+
* hence the existing objects may get reordered (including PUs and NUMA nodes),
2774+
* and their logical indexes may change.
2775+
*
27682776
* \return The inserted object if it was properly inserted.
27692777
*
27702778
* \return An existing object if the Group was merged or discarded

0 commit comments

Comments
 (0)