next_child = child->next_sibling;
hwloc_insert_object_by_parent(topology, parent, child);
}
+
+ if (obj->type == HWLOC_OBJ_MISC) {
+ /* misc objects go in no level (needed here because level building doesn't see Misc objects inside I/O trees) */
+ obj->depth = (unsigned) HWLOC_TYPE_DEPTH_UNKNOWN;
+ }
}
/* Adds a misc object _after_ detection, and thus has to reconnect all the pointers */
if (name)
obj->name = strdup(name);
- /* misc objects go in no level (needed here because level building doesn't see Misc objects inside I/O trees) */
+ /* misc objects go in no level */
obj->depth = (unsigned) HWLOC_TYPE_DEPTH_UNKNOWN;
obj->cpuset = hwloc_bitmap_dup(cpuset);
return NULL;
}
- /* misc objects go in no level (needed here because level building doesn't see Misc objects inside I/O trees) */
- obj->depth = (unsigned) HWLOC_TYPE_DEPTH_UNKNOWN;
-
hwloc_insert_object_by_parent(topology, parent, obj);
hwloc_connect_children(topology->levels[0][0]);
int nb = hwloc_level_filter_object(topology, new_obj, old->children[i]);
if (new_obj) {
new_obj += nb;
- /* misc objects go in no level (needed here because insert_misc() not always involved e.g. during XML import) */
- old->depth = (unsigned) HWLOC_TYPE_DEPTH_UNKNOWN;
}
total += nb;
}