|
1 | 1 | /*
|
2 | 2 | * Copyright © 2009 CNRS
|
3 |
| - * Copyright © 2009-2023 Inria. All rights reserved. |
| 3 | + * Copyright © 2009-2024 Inria. All rights reserved. |
4 | 4 | * Copyright © 2009-2012 Université Bordeaux
|
5 | 5 | * Copyright © 2009-2020 Cisco Systems, Inc. All rights reserved.
|
6 | 6 | * See COPYING in top-level directory.
|
@@ -2859,12 +2859,31 @@ HWLOC_DECLSPEC int hwloc_topology_free_group_object(hwloc_topology_t topology, h
|
2859 | 2859 | * the final location of the Group in the topology.
|
2860 | 2860 | * Then the object can be passed to this function for actual insertion in the topology.
|
2861 | 2861 | *
|
2862 |
| - * Either the cpuset or nodeset field (or both, if compatible) must be set |
2863 |
| - * to a non-empty bitmap. The complete_cpuset or complete_nodeset may be set |
2864 |
| - * instead if inserting with respect to the complete topology |
| 2862 | + * The main use case for this function is to group a subset of |
| 2863 | + * siblings among the list of children below a single parent. |
| 2864 | + * For instance, if grouping 4 cores out of a 8-core socket, |
| 2865 | + * the logical list of cores will be reordered so that the 4 grouped |
| 2866 | + * ones are consecutive. |
| 2867 | + * Then, if needed, a new depth is added between the parent and those |
| 2868 | + * children, and the Group is inserted there. |
| 2869 | + * At the end, the 4 grouped cores are now children of the Group, |
| 2870 | + * which replaces them as a child of the original parent. |
| 2871 | + * |
| 2872 | + * In practice, the grouped objects are specified through cpusets |
| 2873 | + * and/or nodesets, for instance using hwloc_obj_add_other_obj_sets() |
| 2874 | + * iteratively. |
| 2875 | + * Hence it is possible to Group objects that are not children of the |
| 2876 | + * same parent, for instance some PUs below the 4 cores in example above. |
| 2877 | + * However this general case may fail if the expected Group conflicts |
| 2878 | + * with the existing hierarchy. |
| 2879 | + * For instance if each core has two PUs, it is not possible to insert |
| 2880 | + * a Group containing a single PU of each core. |
| 2881 | + * |
| 2882 | + * To specify the objects to group, either the cpuset or nodeset field |
| 2883 | + * (or both, if compatible) must be set to a non-empty bitmap. |
| 2884 | + * The complete_cpuset or complete_nodeset may be set instead if |
| 2885 | + * inserting with respect to the complete topology |
2865 | 2886 | * (including disallowed, offline or unknown objects).
|
2866 |
| - * If grouping several objects, hwloc_obj_add_other_obj_sets() is an easy way |
2867 |
| - * to build the Group sets iteratively. |
2868 | 2887 | * These sets cannot be larger than the current topology, or they would get
|
2869 | 2888 | * restricted silently.
|
2870 | 2889 | * The core will setup the other sets after actual insertion.
|
|
0 commit comments