Brice Goglin, le Sat 17 Jul 2010 12:34:02 +0200, a écrit : > Le 17/07/2010 11:47, Samuel Thibault a écrit : > >> +HWLOC_DECLSPEC int hwloc_get_membind(hwloc_topology_t topology, > >> hwloc_cpuset_t set, int * policy); > >> > > Mmm, I wouldn't have thought of providing the places by giving a cpuset. > > Why not using nodesets? > > If we really start using nodesets intensively, we shouldn't use > hwloc_cpuset_t for their type, it's confusing. Maybe #define > hwloc_nodeset_t hwloc_cpuset_t and add a big comment saying that > nodesets may be manipulated with cpuset functions?
Actually, I'm realizing that I should have realized before with the radset interface of various OSes that it may be better to just have a hwloc_set_t type, and hwloc_cpuset_t/hwloc_nodeset_t types typedefed to it, and tell people to use hwloc_set_* functions with both (but keep #defines for hwloc_cpuset_* API compatibility for some time). > Then, we'd need some conversion routines such as > hwloc_cpuset_from/to_nodeset(topology, cpuset, nodeset). This is done. > And a big comment saying that we don't duplicate all helpers from > nodesets and that people should convert to cpusets before using > helpers. Sure. Samuel