From f57dfcccdf01805a0fb5a816ea6c1c3a00a48806 Mon Sep 17 00:00:00 2001 From: Sindre Nistad Date: Wed, 3 Jan 2024 16:05:20 +0100 Subject: [PATCH] fix: Do not use SSE on Apple Silicon (not supported) --- src/nrlib/random/dSFMT.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nrlib/random/dSFMT.h b/src/nrlib/random/dSFMT.h index 568d6556..5272f74d 100644 --- a/src/nrlib/random/dSFMT.h +++ b/src/nrlib/random/dSFMT.h @@ -42,9 +42,13 @@ extern "C" { #include #include +#if defined(__aarch64__) || defined(__arm64__) +// The existing code does not include instructions for SIMD on ARM (neon) +#else // ------ NR: ------ // We only support computers that have SSE2. #define HAVE_SSE2 +#endif #define DSFMT_MEXP 19937 #if defined(_MSC_VER) && _MSC_VER >= 1600 // Included stdint.h to prevent warning when compiling dSFMT on VS2010 and newer