[Insight-developers] Rounding functions in itkMacro.h

Tom Vercauteren tom.vercauteren at m4x.org
Tue May 19 09:44:06 EDT 2009


Hi, all

I have just committed a patch to vnl_math.h:
  http://www.itk.org/cgi-bin/viewcvs.cgi/Utilities/vxl/core/vnl/vnl_math.h?root=Insight&r1=1.10&r2=1.8&sortby=date

It should fix the wrapping and ppc64 builds failures.

Tom

On Tue, May 19, 2009 at 00:17, Michel Audette
<michel.audette at kitware.com> wrote:
> Hi Tom,
>
> This patch seems to have improved things. The number of failures related to
> this flag and the centered coordinates is down to 16 on my 64-bit Linux
> machine.
>
> Best wishes,
>
> Michel
>
> On Mon, May 18, 2009 at 3:10 PM, Tom Vercauteren <tom.vercauteren at m4x.org>
> wrote:
>>
>> Just a wild guess since I have never played with wrapping before.
>> Could the error in:
>>  http://www.cdash.org/CDash/viewBuildError.php?buildid=335436
>> come from gcc-xml and not from visual c++? Are wrapping builds mixing
>> the use of the native compiler and gcc-xml?
>>
>> In that case it might be that the native compiler allowed for the use
>> of sse2 xml. Hence VNL_CONFIG_ENABLE_SSE2_ROUNDING would be on even
>> for the gcc-xml build that might not support it.
>>
>> In any case, would there be a reson for gcc-xml to use the optimized
>> vnl_rnd functions? We might as well fallback to the vanilla
>> implementation when gcc-xml is used.
>>
>> If this sounds reasonnable, one potential patch would be to change in
>> vnl_math_rnd.h
>>  #if VNL_CONFIG_ENABLE_SSE2_ROUNDING
>> by something like (needs syntax checking)
>>  #if VNL_CONFIG_ENABLE_SSE2_ROUNDING && (!defined(__GCC_XML__))
>> or better by changing
>>
>> #if VNL_CONFIG_ENABLE_SSE2_ROUNDING
>> # if !VXL_HAS_EMMINTRIN_H
>> #   error "Required file emmintrin.h for SSE2 not found"
>> # else
>> #   include <emmintrin.h> // sse 2 intrinsics
>> # endif
>> #endif
>>
>> into
>>
>> #if VNL_CONFIG_ENABLE_SSE2_ROUNDING && (!defined(__GCC_XML__))
>> # if !VXL_HAS_EMMINTRIN_H
>> #   error "Required file emmintrin.h for SSE2 not found"
>> # else
>> #   include <emmintrin.h> // sse 2 intrinsics
>> #   define USE_SSE2_IMPL 1
>> # endif
>> #endif
>>
>> Then use USE_SSE2_IMPL in lieu of VNL_CONFIG_ENABLE_SSE2_ROUNDING in that
>> file.
>>
>>
>> Also it needs changing
>>  #if defined(__GNUC__) && (!defined(__APPLE__)  || !defined(__ppc__) )
>> by something like
>>  #if defined(__GNUC__) && (!defined(__ppc__))  &&
>> (!defined(__ppc64__)) && (!defined(__GCC_XML__))
>>
>> Does that make sense to you?
>> Tom
>>
>> On Mon, May 18, 2009 at 20:20, Wes Turner <wes.turner at kitware.com> wrote:
>> > Tom,
>> >
>> > I am open to suggestions.  There is a bug in one of the ImageReader
>> > tests that is causing some of the Windows and Mac platforms to wait
>> > for a timeout when running itkImageFileReaderDimensionsTest_MHD.  I am
>> > hoping that if I can decipher this, the missing Nightly dashboards
>> > will begin showing up as of tomorrow.  Until then (and after then)
>> > solutions to this problem are welcome!
>> >
>> > - Wes
>> >
>> > (There is another set of failures on the DASH14 Nightly that I need to
>> > re  neesolve as   we
>> > On Mon, May 18, 2009 at 1:32 PM, Tom Vercauteren
>> > <tom.vercauteren at m4x.org> wrote:
>> >> Hi,
>> >>
>> >> The dashboard is showing a mysterious failure:
>> >> http://www.cdash.org/CDash/viewBuildError.php?buildid=335436
>> >>
>> >> Apparently on this MSVC 7 build, __intXX is not defined, e.g.:
>> >>  '__int32' does not name a type
>> >>
>> >> However, the __intXX types are listed to be fundamental types for this
>> >> compiler:
>> >>  http://msdn.microsoft.com/en-us/library/29dh1w7z(VS.71).aspx
>> >>
>> >> Also we are not even directly using these types. They are apparently
>> >> pulled in by emmintrin.h. This build seem to have wrapping turned on.
>> >> Could this be somehow related to the error that Kent Williams just
>> >> reported:
>> >>
>> >>  http://www.itk.org/mailman/private/insight-developers/2009-May/012545.html
>> >>
>> >> This is beyond my understanding. Any thoughts?
>> >>
>> >> Tom


More information about the Insight-developers mailing list