@@ -170,7 +170,7 @@ int main(void)
170
170
for (i = 0 ; i < 16 ; i ++ )
171
171
values [i + 16 * i ] = 1 ;
172
172
handle = hwloc_distances_add_create (topology , NULL ,
173
- HWLOC_DISTANCES_KIND_VALUE_LATENCY |HWLOC_DISTANCES_KIND_FROM_USER ,
173
+ HWLOC_DISTANCES_KIND_VALUE_HOPS |HWLOC_DISTANCES_KIND_FROM_USER ,
174
174
0 );
175
175
assert (handle );
176
176
err = hwloc_distances_add_values (topology , handle , 16 , objs , values , 0 );
@@ -197,7 +197,7 @@ int main(void)
197
197
assert (nr == 1 );
198
198
assert (distances [0 ]);
199
199
assert (distances [0 ]-> values );
200
- assert (distances [0 ]-> kind == (HWLOC_DISTANCES_KIND_VALUE_LATENCY |HWLOC_DISTANCES_KIND_FROM_USER ));
200
+ assert (distances [0 ]-> kind == (HWLOC_DISTANCES_KIND_VALUE_HOPS |HWLOC_DISTANCES_KIND_FROM_USER ));
201
201
/* check that some random values are ok */
202
202
assert (distances [0 ]-> values [0 ] == 1 ); /* diagonal */
203
203
assert (distances [0 ]-> values [1 ] == 2 ); /* same group */
@@ -289,11 +289,11 @@ int main(void)
289
289
assert (distances [1 ]-> kind == (HWLOC_DISTANCES_KIND_VALUE_BANDWIDTH |HWLOC_DISTANCES_KIND_FROM_USER |HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES ));
290
290
hwloc_distances_release (topology , distances [1 ]);
291
291
nr = 2 ;
292
- err = hwloc_distances_get (topology , & nr , distances , HWLOC_DISTANCES_KIND_VALUE_LATENCY |HWLOC_DISTANCES_KIND_FROM_OS , 0 );
292
+ err = hwloc_distances_get (topology , & nr , distances , HWLOC_DISTANCES_KIND_VALUE_LATENCY |HWLOC_DISTANCES_KIND_VALUE_HOPS | HWLOC_DISTANCES_KIND_FROM_OS , 0 );
293
293
assert (!err );
294
294
assert (nr == 0 );
295
295
nr = 2 ;
296
- err = hwloc_distances_get (topology , & nr , distances , HWLOC_DISTANCES_KIND_VALUE_LATENCY |HWLOC_DISTANCES_KIND_FROM_USER , 0 );
296
+ err = hwloc_distances_get (topology , & nr , distances , HWLOC_DISTANCES_KIND_VALUE_LATENCY |HWLOC_DISTANCES_KIND_VALUE_HOPS | HWLOC_DISTANCES_KIND_FROM_USER , 0 );
297
297
assert (!err );
298
298
assert (nr == 2 );
299
299
hwloc_distances_release (topology , distances [0 ]);
0 commit comments