Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] dynamic cpuset_t?
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2009-10-07 11:44:33


I just pushed a huge commit converting everything to dynamic cpusets.

The new API is visable at
   
https://svn.open-mpi.org/trac/hwloc/browser/trunk/include/hwloc/cpuset.h?rev=1109
The implementation is pretty much the same than our old inlines, see
    https://svn.open-mpi.org/trac/hwloc/browser/trunk/src/cpuset.c?rev=1109

Some examples of conversion to the new API are visible near
    https://svn.open-mpi.org/trac/hwloc/changeset/1109#file26

Note that cpuset_alloc() initializes the cpuset to 0. Many old cpusets
were memset'ed to 0 during the object creation, so I didn't want to
break this guarantee. If needed, we could have hwloc_cpuset_alloc_zero()
for this?

There's still a internal cpuset.h header
   
https://svn.open-mpi.org/trac/hwloc/browser/trunk/include/private/cpuset.h?rev=1109
but only cpuset.c uses it. So if there's no real need for other internal
files to access the cpuset internals, we could merge cpuset.h into cpuset.c.

Brice