[Insight-developers] Dashboard: Persistant itkClampImageFilterTest

Cory Quammen cquammen at cs.unc.edu
Tue May 7 11:42:38 EDT 2013


Brad,

On Tue, May 7, 2013 at 11:13 AM, Bradley Lowekamp
<blowekamp at mail.nih.gov> wrote:
> Cory,
>
> I didn't think the following statement was true, and least for all compiler
> we use to support:
>
> On May 7, 2013, at 10:00 AM, Cory Quammen <cquammen at cs.unc.edu> wrote:
>
>
> __int64 in Visual Studio appears to really be a "long long", and there
> are numeric traits for that type as well as "unsigned long long"
>
>
> A quick check of the VS 2012 MSDN documentation says[1]: :The __int64 type
> has no ANSI equivalent."
>
> http://msdn.microsoft.com/en-us/library/29dh1w7z.aspx

I just meant that in the test output, references to 'long long' appear
in the failure messages with the name __int64 instead of 'long long'.
I'm not a language lawyer, but I believe 'long long' has been
considered for inclusion in the ANSI C++ standard for a while, but I'm
not sure if it has been accepted. I know when you enable -pedantic in
gcc without -wno-long-long, it complains that ISO C++ does not support
‘long long’ . Perhaps that's why the MSDN documentation says __int64
type has no ANSI equivalent.

> In thinking about my VS build vs the others I may be the only one without
> 64-bit IDs enabled... So the error may... be related to that.
>
>
> Bill Lorensen and I banged out heads on a similar error in this filter
> that happened only on Windows for this type (I think it was this
> type). It turned out that turning off optimization for this particular
> test solved the problem on windows. This filter was recently moved to
> the IntensityFilter module, but the CMakeLists.txt file there looks
> like it is turning off optimization for this test, so I'm not sure
> what is causing these errors.
>
>
> There is likely a real problem with the filter. And just disabling
> optimization likely hides it.
>
> My quick look at it says there are likely some issues with 64-bit integers,
> being converted to doubles:
>
> https://github.com/Kitware/ITK/blob/master/Modules/Filtering/ImageIntensity/include/itkClampImageFilter.h#L95

There isn't a problem with gcc on linux or Mac OS X with optimization
on. Only Visual Studio has this error with optimization enabled. There
was no failure in debug builds, as I recall. Hence, my suspicion of
compiler optimization being the culprit. I'm happy to be proven wrong.

You may also be interested to learn that the CastImageFilter also has
this issue on Visual Studio with the 'long long' type. Both filters
perform casting.

Cory

--
Cory Quammen
Research Associate
Department of Computer Science
The University of North Carolina at Chapel Hill


More information about the Insight-developers mailing list