File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright © 2010-2022 Inria. All rights reserved.
2
+ * Copyright © 2010-2024 Inria. All rights reserved.
3
3
* Copyright © 2011-2012 Université Bordeaux
4
4
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
5
5
* See COPYING in top-level directory.
@@ -624,8 +624,8 @@ void * hwloc_distances_add_create(hwloc_topology_t topology,
624
624
return NULL ;
625
625
}
626
626
if ((kind & ~HWLOC_DISTANCES_KIND_ALL )
627
- || hwloc_weight_long (kind & HWLOC_DISTANCES_KIND_FROM_ALL ) != 1
628
- || hwloc_weight_long (kind & HWLOC_DISTANCES_KIND_MEANS_ALL ) != 1 ) {
627
+ || hwloc_weight_long (kind & HWLOC_DISTANCES_KIND_FROM_ALL ) > 1
628
+ || hwloc_weight_long (kind & HWLOC_DISTANCES_KIND_MEANS_ALL ) > 1 ) {
629
629
errno = EINVAL ;
630
630
return NULL ;
631
631
}
Original file line number Diff line number Diff line change @@ -70,9 +70,9 @@ struct hwloc_distances_s {
70
70
* The \p kind attribute of struct hwloc_distances_s is a OR'ed set
71
71
* of kinds.
72
72
*
73
- * Each distance matrix has exactly one kind HWLOC_DISTANCES_KIND_FROM_*
73
+ * Each distance matrix may have only one kind among HWLOC_DISTANCES_KIND_FROM_*
74
74
* specifying where distance information comes from,
75
- * and exactly one kind HWLOC_DISTANCES_KIND_MEANS_* specifying
75
+ * and one kind among HWLOC_DISTANCES_KIND_MEANS_* specifying
76
76
* whether values are latencies or bandwidths.
77
77
*/
78
78
enum hwloc_distances_kind_e {
@@ -356,7 +356,7 @@ typedef void * hwloc_distances_add_handle_t;
356
356
* Otherwise, it will be copied internally and may later be freed by the caller.
357
357
*
358
358
* \p kind specifies the kind of distance as a OR'ed set of ::hwloc_distances_kind_e.
359
- * Exactly one kind of meaning and one kind of provenance must be given
359
+ * Only one kind of meaning and one kind of provenance may be given if appropriate
360
360
* (e.g. ::HWLOC_DISTANCES_KIND_MEANS_BANDWIDTH and ::HWLOC_DISTANCES_KIND_FROM_USER).
361
361
* Kind ::HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES will be automatically set
362
362
* according to objects having different types in hwloc_distances_add_values().
You can’t perform that action at this time.
0 commit comments