[vtkusers] #Defines for Big or Little Endian

Sean McBride sean at rogue-research.com
Fri Sep 1 13:09:30 EDT 2006


On 2006-09-01 11:06, Mike Jackson said:

>No, actually vtkByteSwap::Swap4BE() does the swap period. It does not pay
>attention to if it actually _needs_ to be done. It just does it.

Are you sure?  It looks to me like it's wrapped in #if defined
(VTK_WORDS_BIGENDIAN).  But the code is full of templates and macros and
C++ gives me a headache. :)  The docs don't help much either, Swap4BE()
is amusingly described as "Swap 2, 4, or 8 bytes for storage as Big
Endian". huh?

I'll think you'll have to make a little test app and try the various
functions in vtkByteSwap.

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada





More information about the vtkusers mailing list