1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
# check if the platform has sse functions
include(CheckCXXSourceCompiles)
include(CheckIncludeFiles)
check_include_files("emmintrin.h" HAVE_EMMINTRIN_H)
check_cxx_source_compiles("
#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;
}
"
ITK_COMPILER_SUPPORTS_SSE2_64
)
check_cxx_source_compiles("
#include <emmintrin.h> // sse 2 intrinsics
int main()
{
float x = 0.5;
_mm_cvtss_si32( _mm_set_ss(x) );
_mm_cvtsd_si32( _mm_set_sd(x) );
return 0;
}
"
ITK_COMPILER_SUPPORTS_SSE2_32
)
check_cxx_source_compiles("
#include <emmintrin.h> // sse 2 intrinsics
int main()
{
#if !defined( __SSE__ )
# error
#endif
#if !defined( __SSE2__ )
# error
#endif
#if !defined( __SSE_MATH__ )
# error
#endif
#if !defined( __SSE2_MATH__ )
# error
#endif
return 0;
}
"
ITK_COMPILER_DOES_NOT_NEED_MSSE2_FLAG
)
|