summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt12
-rw-r--r--src/ffts_nd.c4
2 files changed, 12 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d83367e..5a1a897 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -136,6 +136,12 @@ if(NOT CMAKE_CROSSCOMPILING)
if(HAVE_XMMINTRIN_H)
add_definitions(-DHAVE_SSE)
endif(HAVE_XMMINTRIN_H)
+
+ # check if the platform has support for SSE2 SIMD extension
+ check_include_file(emmintrin.h HAVE_EMMINTRIN_H)
+ if(HAVE_EMMINTRIN_H)
+ add_definitions(-DHAVE_SSE2)
+ endif(HAVE_EMMINTRIN_H)
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
else()
# Check if we can always use detection code above?
@@ -160,9 +166,11 @@ elseif(CMAKE_COMPILER_IS_GNUCC)
list(APPEND FFTS_EXTRA_LIBRARIES m)
endif(HAVE_LIBM)
- if(HAVE_XMMINTRIN_H)
+ if(HAVE_EMMINTRIN_H)
+ add_definitions(-msse2)
+ elseif(HAVE_XMMINTRIN_H)
add_definitions(-msse)
- endif(HAVE_XMMINTRIN_H)
+ endif(HAVE_EMMINTRIN_H)
endif(MSVC)
include_directories(include)
diff --git a/src/ffts_nd.c b/src/ffts_nd.c
index 839e35b..23338c1 100644
--- a/src/ffts_nd.c
+++ b/src/ffts_nd.c
@@ -37,8 +37,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef HAVE_NEON
#include "neon.h"
#include <arm_neon.h>
-#elif HAVE_SSE
-#include <xmmintrin.h>
+#elif HAVE_SSE2
+#include <emmintrin.h>
#endif
#define TSIZE 8
OpenPOWER on IntegriCloud