Re: [hwloc-devel] comments on API changes

2010-04-02 Thread Samuel Thibault
Fawzi Mohamed, le Fri 02 Apr 2010 17:34:20 +0200, a écrit :
> would be fine with me, planning to add al lot of flags? because there  
> is still lot of space to grow (and one can later switch to 64 bit... :)

Just switching to 64bits would break the ABI. It's better to just use
chars and be done with the ABI :)

> >>HWLOC_OBJ_SYSTEM seems on the way out
> >
> >It isn't :)
> >
> >>I treated it just as a MACHINE anyway,
> >
> >What do you mean by this?  They really are not supposed to be the  
> >same,
> >as Brice explained.
> 
> I understand, but in the end I am just interested in building a  
> structure to have a sequence where you first look at neighbors, and  
> then further and further away, so I use both just as a way got keep  
> together things that have the same "distance".

Mmm, I don't understand.  Why would you need to have a look at the type?
Can't you test the parent pointer to know whether you got at the top of
the hierarchy?

Samuel


Re: [hwloc-devel] comments on API changes

2010-04-02 Thread Fawzi Mohamed


On 2-apr-10, at 16:17, Samuel Thibault wrote:


Fawzi Mohamed, le Fri 02 Apr 2010 14:38:26 +0200, a écrit :
I would take advantage more info about the possible numa node  
connectivity (to

know where to steal tasks),


This is on the TODO list, although (as Brice mentioned) OS often do  
not

provide such information.

Thanks for the comments!


thank you for your answers, I don't post often here, but I always had  
good answers/discussions with you Brice and Jeff...


Fawzi


Re: [hwloc-devel] comments on API changes

2010-04-02 Thread Fawzi Mohamed


On 2-apr-10, at 16:16, Samuel Thibault wrote:


Fawzi Mohamed, le Fri 02 Apr 2010 12:34:58 +0200, a écrit :

flags attributes:
C bitfields are used, normally they are avoided because they are slow
(a compiler can bit or at compile time the constants and check/set
several at once.
Speed is not a concern here, but in any case I am wrapping to D that
does not support bitfields directly, so I used flags, I was just
wondering why bitfields were used...


Mmm, thinking twice about it.  As Brice mentioned, this is not really
performance-critical.  But since it's not performance-critical, it is
probably not a problem to just use chars here.  Also, maybe we can  
use a

level of pointer to avoid any ABI issue when adding fields?


would be fine with me, planning to add al lot of flags? because there  
is still lot of space to grow (and one can later switch to 64 bit... :)



HWLOC_OBJ_SYSTEM seems on the way out


It isn't :)


I treated it just as a MACHINE anyway,


What do you mean by this?  They really are not supposed to be the  
same,

as Brice explained.


I understand, but in the end I am just interested in building a  
structure to have a sequence where you first look at neighbors, and  
then further and further away, so I use both just as a way got keep  
together things that have the same "distance".

It is not strictly correct, but seems to work well in practice...

Fawzi