Skip to content

Commit be5bc64

Browse files
committed
distances: clarify that distances must have one FROM and one MEANS kind
MEANS might need to be relaxed, but that's what's implemented right now. Signed-off-by: Brice Goglin <[email protected]>
1 parent d511cf8 commit be5bc64

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

include/hwloc/distances.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2010-2023 Inria. All rights reserved.
2+
* Copyright © 2010-2024 Inria. All rights reserved.
33
* See COPYING in top-level directory.
44
*/
55

@@ -70,11 +70,10 @@ struct hwloc_distances_s {
7070
* The \p kind attribute of struct hwloc_distances_s is a OR'ed set
7171
* of kinds.
7272
*
73-
* A kind of format HWLOC_DISTANCES_KIND_FROM_* specifies where the
74-
* distance information comes from, if known.
75-
*
76-
* A kind of format HWLOC_DISTANCES_KIND_MEANS_* specifies whether
77-
* values are latencies or bandwidths, if applicable.
73+
* Each distance matrix has exactly one kind HWLOC_DISTANCES_KIND_FROM_*
74+
* specifying where distance information comes from,
75+
* and exactly one kind HWLOC_DISTANCES_KIND_MEANS_* specifying
76+
* whether values are latencies or bandwidths.
7877
*/
7978
enum hwloc_distances_kind_e {
8079
/** \brief These distances were obtained from the operating system or hardware.
@@ -357,6 +356,8 @@ typedef void * hwloc_distances_add_handle_t;
357356
* Otherwise, it will be copied internally and may later be freed by the caller.
358357
*
359358
* \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
360+
* (e.g. ::HWLOC_DISTANCES_KIND_MEANS_BANDWIDTH and ::HWLOC_DISTANCES_KIND_FROM_USER).
360361
* Kind ::HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES will be automatically set
361362
* according to objects having different types in hwloc_distances_add_values().
362363
*

0 commit comments

Comments
 (0)