Yo,

Perso, la solution  obj->userdata me semble très raisonnable.
Je pense que le public auquel s'adresse Hwloc est tout à fait
capable d'utiliser un champ en tant que scratchpad, non ?

A+
Guillaume


On 08/21/2013 09:45 AM, Brice Goglin wrote:
Hello,

There was some discussion yesterday about how to find the topology
pointer if you only have a hwloc_obj. There's currently no way as far as
I know. You're supposed to always keep a topology pointer with you,
because the API basically requires it everywhere (except when really
only looking inside a single object).

But I can understand that it can be annoying to pass both object +
topology to many of your own functions just because you'll call a hwloc
function at the end (and that one may sometimes not even use it). So we
could add a topology field in struct hwloc_obj. Applications would have
to #if HWLOC_API_VERSION>= 0x10800 if they want to conditionally use this.

Should we bother doing this? Or just tell the application "if you really
need to find the topology back, make it available through obj->userdata" ?

Brice

_______________________________________________
hwloc-devel mailing list
hwloc-de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel

Reply via email to