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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index db20caa7..48e724f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,6 +25,7 @@ option (ENABLE_SSE "Compile with SSE instruction set support" OFF)
option (ENABLE_SSE2 "Compile with SSE2 instruction set support" OFF)
option (ENABLE_AVX "Compile with AVX instruction set support" OFF)
option (ENABLE_AVX2 "Compile with AVX2 instruction set support" OFF)
+option (ENABLE_NEON "Compile with NEON instruction set support" OFF)
option (DISABLE_FORTRAN "Disable Fortran wrapper routines" OFF)
@@ -203,9 +204,20 @@ if (ENABLE_AVX2)
endforeach ()
endif ()
+if (ENABLE_NEON)
+ if (ENABLE_LONG_DOUBLE)
+ message (FATAL_ERROR "NEON only works in single or double precision, please disable long double support")
+ endif ()
+ if (ENABLE_QUAD_PRECISION)
+ message (FATAL_ERROR "NEON only works in single or double precision, please disable quad precision support")
+ endif ()
+ set (HAVE_NEON TRUE)
+endif ()
+
if (HAVE_SSE2 OR HAVE_AVX)
set (HAVE_SIMD TRUE)
endif ()
+
file(GLOB fftw_api_SOURCE api/*.c api/*.h)
file(GLOB fftw_dft_SOURCE dft/*.c dft/*.h)
file(GLOB fftw_dft_scalar_SOURCE dft/scalar/*.c dft/scalar/*.h)
@@ -215,6 +227,7 @@ file(GLOB fftw_dft_simd_SOURCE dft/simd/*.c dft/simd
file(GLOB fftw_dft_simd_sse2_SOURCE dft/simd/sse2/*.c dft/simd/sse2/*.h)
file(GLOB fftw_dft_simd_avx_SOURCE dft/simd/avx/*.c dft/simd/avx/*.h)
file(GLOB fftw_dft_simd_avx2_SOURCE dft/simd/avx2/*.c dft/simd/avx2/*.h dft/simd/avx2-128/*.c dft/simd/avx2-128/*.h)
+file(GLOB fftw_dft_simd_neon_SOURCE dft/simd/neon/*.c dft/simd/neon/*.h)
file(GLOB fftw_kernel_SOURCE kernel/*.c kernel/*.h)
file(GLOB fftw_rdft_SOURCE rdft/*.c rdft/*.h)
file(GLOB fftw_rdft_scalar_SOURCE rdft/scalar/*.c rdft/scalar/*.h)
@@ -230,6 +243,7 @@ file(GLOB fftw_rdft_simd_SOURCE rdft/simd/*.c rdft/sim
file(GLOB fftw_rdft_simd_sse2_SOURCE rdft/simd/sse2/*.c rdft/simd/sse2/*.h)
file(GLOB fftw_rdft_simd_avx_SOURCE rdft/simd/avx/*.c rdft/simd/avx/*.h)
file(GLOB fftw_rdft_simd_avx2_SOURCE rdft/simd/avx2/*.c rdft/simd/avx2/*.h rdft/simd/avx2-128/*.c rdft/simd/avx2-128/*.h)
+file(GLOB fftw_rdft_simd_neon_SOURCE rdft/simd/neon/*.c rdft/simd/neon/*.h)
file(GLOB fftw_reodft_SOURCE reodft/*.c reodft/*.h)
file(GLOB fftw_simd_support_SOURCE simd-support/*.c simd-support/*.h)
@@ -283,6 +297,10 @@ if (HAVE_AVX2)
list (APPEND SOURCEFILES ${fftw_dft_simd_avx2_SOURCE} ${fftw_rdft_simd_avx2_SOURCE})
endif ()
+if (HAVE_NEON)
+ list (APPEND SOURCEFILES ${fftw_dft_simd_neon_SOURCE} ${fftw_rdft_simd_neon_SOURCE})
+endif ()
+
set (FFTW_VERSION 3.3.10)
set (PREC_SUFFIX)
diff --git a/cmake.config.h.in b/cmake.config.h.in
index 1f4c5055..8c61b38f 100644
--- a/cmake.config.h.in
+++ b/cmake.config.h.in
@@ -211,7 +211,7 @@
/* #undef HAVE_MPI */
/* Define to enable ARM NEON optimizations. */
-/* #undef HAVE_NEON */
+#cmakedefine HAVE_NEON 1
/* Define if OpenMP is enabled */
#cmakedefine HAVE_OPENMP
|