Hi Glen, 

I was probably the last person (other than Peter :-) )  who touched these few lines.    To make it short,  I do not believe the macro definition __INTEL__, or anything similar, exists with GCC.  

On Mac OSX,  Apple does define a few macros for specifying the platform:  __ppc__, __i386__, and __x86_64__.  But I do not think GCC takes this approach in general (or I am unaware of). 

On the other hand, instead of modifying vnl_math.h,  your problem can be solved on a per-build basis.  You can change the value of a CMake advanced variable, VNL_CONFIG_ENABLE_SSE2_ROUNDING, to zero and it should fall back to general rounding methods. 

Gehua Yang
DualAlign LLC

On Aug 11, 2010, at 2:00 PM, Brooksby, Glen W (GE Global Research) wrote:

I believe there is a problem in vnl_math.h that is preventing it from compiling on my platform.

Beginning at line 54 is the following:

// Turn on fast impl when using GCC on Intel-based machines with the following exception:
//   PPC with Mac OS X
#if defined(__GNUC__) && (!defined(__APPLE__)  || !defined(__ppc__) )
# define GCC_USE_FAST_IMPL 1
# define GCC_USE_FAST_IMPL 0

This presumes that if you are using a GNU compiler and you are not on a Mac or a ppc, you must be on an Intel platform.

In my case I'm using the GNU compiler, but not on an Intel processor so the compiler dies because GCC_USE_FAST_IMPL causes Intel assembler code to be inserted. 

There's a simple work-around for my case (force GCC_USE_FAST_IMPL to always be 0), but what is the best way to fix this?

I would think it would be something like
#if defined(__GNUC__) && (defined(__INTEL__)
But I don't know if an __INTEL__ define exists.

Glen W. Brooksby
Electrical Engineer
GE Global Research
Imaging Technologies

T + 518 387 6977
F + 518 387 4136
1 Research Circle, KWC-408D
Niskayuna, NY 12309 USA

GE imagination at work

This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev _______________________________________________
Vxl-maintainers mailing list