Le 25/08/2011 00:19, Samuel Thibault a écrit : > [email protected], le Wed 24 Aug 2011 17:27:50 +0200, a écrit : >> + HWLOC_BACKEND_CUSTOM, > Actually, maybe rather than "custom", use "empty"?
Could be better yes. I am also thinking of renaming the corresponding insert functions to have a common prefix for everything that can modify custom/empty topos: <prefix>_insert_topology <prefix>_insert_object... However, having "empty" in this prefix doesn't look so good to me. hwloc_assembler_ ? This new insert_object would only work on empty/custom topo (while the current insert_misc works after load in a normal topo, or before load in a custom/empty topo). Separating these insert functions would also let us change from Misc to something else. Misc don't go in any level, while we'll probably want a level/depth for intermediate switches between the root/system and the machines. So it could be <prefix>_insert_group(topology, parent, groupdepth) In the end, I'd like to have a dedicated section in the header and doc where functions only work on empty/custom topo, and explain that they may only insert stuff below the following objects: * the root of a custom/empty topo * an object return by insert_misc earlier If we keep things scattered like currently (set_custom is near set_xml/synthetic, both insert_misc are near insert_topology), I am afraid we're going to have people try to insert everywhere they want, and we'd have to document which parent/sibling/child links are already ready before load. Brice
