[Bf-committers] Sharp/Flat selections
Chris Want
cwant at ualberta.ca
Wed Dec 28 21:27:17 CET 2005
> Is that safe for 64 bit systems too? Also are compilers allowed to
> reorder stuff in structs at high optimization levels? Also would
> making it a true long int and having the old f1 and f2 accessed via a
> bitmask method work?
Certainly if either f1 or f2 were made a long
(or maybe have a field in the edge struct that is
general use void pointer?) then I could use
one of them directly and this would be no need
to abuse the two shorts. It seems quite common that
two shorts would have enough storage to hold a
long, so I would expect that is the case with
64 bit platforms too. My code needs an int that
is large enough to hold a unique integer for
every edge in the mesh, so a short will not
generally suffice.
I'm not sure what compiler optimizations would
do, but I doubt they would reorder these
fields.
Maybe somebody with some programming experience
in the mesh code can comment?
Chris
More information about the Bf-committers
mailing list