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

Reply via email to