[Insight-developers] Rounding functions in itkMacro.h
Sean McBride
sean at rogue-research.com
Wed May 20 10:34:42 EDT 2009
On 5/20/09 11:41 AM, Tom Vercauteren said:
>Sorry __powerpc__ was a typo, it should have been __ppc__ which is
>what is used in vnl_math.h:
OK. Indeed, __ppc__ refers to 32bit PowerPC only, and __ppc64__ refers
to 64bit PowerPC only.
>> But what are we really testing for here? Is this 'fast impl' Intel
>> only? If so, why not test _for_ Intel, instead of not PowerPC? Note
>> that Mac OS X also builds on ARM (for iPhone), though I'm not sure
>> anyone is using ITK there (yet).
>
>Absolutely right, what we should test is whether we are on a x86
>platform. Changing
> #if defined(__GNUC__) && (!defined(__GCCXML__)) &&
>(!defined(__ppc__)) && (!defined(__ppc64__))
>by something like
> #if defined(__GNUC__) && (!defined(__GCCXML__)) && (defined(i386)
>|| defined(__i386__) || defined(__i386) || defined(__x86_64__) ||
>defined(__x86_64))
>in vnl_math.h would indeed make more sense. I am just not completely
>sure what the correct way for testing for x86 with gcc is. There might
>be a better cmake way of doing this. Also I won't be here to track
>potential dashboard failures until next Monday.
On OS X, defined(__i386__) || defined(__x86_64__) would do the trick,
and is what Apple uses in their headers. I'm not sure if that's a gcc
thing or an Apple thing though.
--
____________________________________________________________
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 Insight-developers
mailing list