Tom,

Thank you for the information. I was unaware of the patch submission.

Gehua.


On Thu, Aug 12, 2010 at 1:50 AM, Tom Vercauteren <tom.vercauteren@m4x.org> wrote:
Hi Gehua,

I worked a little on those points in order to be able to use fast
rounding in ITK. After submitting a few vnl patches that did not make
it into the trunk:
http://sourceforge.net/apps/trac/vxl/ticket/35
http://sourceforge.net/apps/trac/vxl/ticket/36
http://sourceforge.net/apps/trac/vxl/ticket/44
we had to move forward to have ITK working on all supported version.
Hence, we moved the efficient rounding code inside ITK proper:
http://itk.org/gitweb?p=ITK.git;a=blob;f=Code/Common/itkMathDetail.h;h=63893355ebe122850fa2c292cf7b3c426f917504;hb=HEAD
http://itk.org/gitweb?p=ITK.git;a=blob;f=Code/Common/itkMath.h;h=bb6eeeac71d3da6d450da58faedd967b90b62bc7;hb=HEAD

Also, we had to patch the vnl version that comes bundled with ITK. See
for example:
http://itk.org/gitweb?p=ITK.git;a=commitdiff;h=49f9a51e43957012ed8439dedfbba61a88079997
http://itk.org/gitweb?p=ITK.git;a=commitdiff;h=da9b08e3295f933c84658de3defda7459c542e86

Hope this helps,
Tom

On Thu, Aug 12, 2010 at 03:45, Gehua Yang <yanggehua@gmail.com> wrote:
> 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
> #else
> # define GCC_USE_FAST_IMPL 0
> #endif
>
> 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
> brooksby@ge.com
>
> 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
> Vxl-maintainers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/vxl-maintainers
>
>
> ------------------------------------------------------------------------------
> 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
> Vxl-maintainers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/vxl-maintainers
>
>