File: CheckSupportForSSERounding.cmake

package info (click to toggle)
insighttoolkit4 4.13.3withdata-dfsg2-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 491,256 kB
  • sloc: cpp: 557,600; ansic: 180,546; fortran: 34,788; python: 16,572; sh: 2,187; lisp: 2,070; tcl: 993; java: 362; perl: 200; makefile: 133; csh: 81; pascal: 69; xml: 19; ruby: 10
file content (58 lines) | stat: -rw-r--r-- 896 bytes parent folder | download | duplicates (6)
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
)