[Insight-users] Error itk::Math::Detail::RoundHalfIntegerToEven_64(double)

Paolo Zaffino p.zaffino at yahoo.it
Tue Apr 3 12:49:48 EDT 2012


Dear Brad,

First of all thanks for the reply.

gcc --version returns me this:
gcc (GCC) 4.1.3 20080704 (prerelease) (Ubuntu 4.1.2-27ubuntu1)

The command
$ grep ITK_COMPILER_SUPPORTS_SSE2 CMakeCache.txt
dosen'nt give me any result...so I guess that this string is absent.

I copied the C++ code that you sent me into a file (test_ITK.cxx) and I tried to compile it by
$ gcc test_itk.cxx -o test_ITK
it doesn't compile and I get this error:

test_itk.cxx: In function ‘int main()’:
test_itk.cxx:5: error: ‘_mm_cvtss_si64’ was not declared in this scope
test_itk.cxx:6: error: ‘_mm_cvtsd_si64’ was not declared in this scope


Thank you.

Paolo




________________________________
 Da: Bradley Lowekamp <blowekamp at mail.nih.gov>
A: Paolo Zaffino <p.zaffino at yahoo.it> 
Cc: "insight-users at itk.org" <insight-users at itk.org>; Andrea Cherubini <a.cherubini at isn.cnr.it>; Maria Francesca Spadea <mfspadea at unicz.it>; James Shackleford <james.a.shackleford at gmail.com> 
Inviato: Martedì 3 Aprile 2012 17:57
Oggetto: Re: [Insight-users] Error itk::Math::Detail::RoundHalfIntegerToEven_64(double)
 

Hello Paolo,

What compiler are you using?

I am curious if certain CMake variables are set. Could you run the following command in you build root:

$ grep ITK_COMPILER_SUPPORTS_SSE2 CMakeCache.txt

We should be running a try compile on the following bit of code to detect if you compiler supports this intrinsic.

#include <emmintrin.h> // sse 2 intrinsics                                                                                        
int main()                                                                                                                        
{                                                                                                                                 
float x = 0.5;                                                                                                                    
_mm_cvtss_si64( _mm_set_ss(x) );                                                                                                  
_mm_cvtsd_si64( _mm_set_sd(x) );                                                                                                  
return 0;                                                                                                                         
}

I am wondering where things went wrong, and if you compiler actually supports this.

Brad


On Apr 3, 2012, at 11:09 AM, Paolo Zaffino wrote:

Dear ITK community,
>
>I'm trying to compile ITK 3.20.1 on a pc with Ubuntu 10.04 64 bit setting these flags:
>
>CMAKE_BUILD_TYPE    Release
>BUILD_EXAMPLES    OFF
>BUILD_TESTING     OFF
>ITK_USE_REVIEW    ON
>ITK_USE_OPTIMIZED_REGITRATION_METHODS    ON
>
>The cmake step ends without problems but when I try to compile the code I get this error:
>
>Building CXX object
 Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_matrix_fixed+double.3.12-.o
>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_matrix_fixed_ref+double.2.2-.o
>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_matrix_fixed_ref+double.2.3-.o
>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_matrix_fixed_ref+double.3.12-.o
>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_matrix_fixed_ref+double.4.3-.o
>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_matrix_fixed_ref+double.4.4-.o
>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_vector+short-.o
>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_vector+ushort-.o
>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_vector+char-.o
>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_vector+size_t-.o
>[ 80%] Building
 CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_fft_base+double.3-.o
>[ 80%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_fft_base+float.3-.o
>Linking CXX static library ../../bin/libitkvnl_inst.a
>[ 80%] Built target itkvnl_inst
>Scanning dependencies of target ITKCommon
>[ 80%] [ 80%] Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkBarrier.o
>Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkBloxItem.o
>[ 80%] [ 80%] Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkChainCodePath2D.o
>Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkCommand.o
>[ 80%] Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkConditionVariable.o
>[ 81%] Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkCovariantVector.o
>[ 81%] Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkDataObject.o
>/usr/local/lib/InsightToolkit-3.20.1/Code/Common/itkMathDetail.h: In
 function ‘itk::int64_t itk::Math::Detail::RoundHalfIntegerToEven_64(double)’:
>/usr/local/lib/InsightToolkit-3.20.1/Code/Common/itkMathDetail.h:251: error: ‘_mm_cvtsd_si64’ was not declared in this scope
>/usr/local/lib/InsightToolkit-3.20.1/Code/Common/itkMathDetail.h: In function ‘itk::int64_t itk::Math::Detail::RoundHalfIntegerToEven_64(float)’:
>/usr/local/lib/InsightToolkit-3.20.1/Code/Common/itkMathDetail.h:258: error: ‘_mm_cvtss_si64’ was not declared in this scope
>[ 81%] Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkDecisionRuleBase.o
>make[2]: *** [Code/Common/CMakeFiles/ITKCommon.dir/itkChainCodePath2D.o] Error 1
>make[2]: *** Waiting for unfinished jobs....
>make[1]: *** [Code/Common/CMakeFiles/ITKCommon.dir/all] Error 2
>make: *** [all] Error 2
>
>
>Do you have any idea about?
>
>Thank you very much.
>Regards.
>
>Paolo_____________________________________
>Powered by www.kitware.com
>
>Visit other Kitware open-source projects at
>http://www.kitware.com/opensource/opensource.html
>
>Kitware offers ITK Training Courses, for more information visit:
>http://www.kitware.com/products/protraining.php
>
>Please keep messages on-topic and check the ITK FAQ at:
>http://www.itk.org/Wiki/ITK_FAQ
>
>Follow this link to subscribe/unsubscribe:
>http://www.itk.org/mailman/listinfo/insight-users
>

========================================================
Bradley Lowekamp  
Medical Science and Computing for
Office of High Performance Computing and Communications
National Library of Medicine 
blowekamp at mail.nih.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120403/3a27da0c/attachment.htm>


More information about the Insight-users mailing list