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
|
From: Michael R. Crusoe <crusoe@debian.org>
Subject: Enable building on non-x86 systems
Forwarded: https://github.com/amplab/snap/pull/130
--- snap-aligner.orig/SNAPLib/Compat.h
+++ snap-aligner/SNAPLib/Compat.h
@@ -77,12 +77,18 @@
#include <sched.h> // For sched_setaffinity
#endif
-#if defined(__SSE__) && !defined(__APPLE__)
-#include <xmmintrin.h> // This is currently (in Dec 2013) broken on Mac OS X 10.9 (Apple clang-500.2.79)
-#else
-#define _mm_prefetch(...) {}
-#include <emmintrin.h> // For vector types like __m128i
-#endif
+#define SIMDE_ENABLE_NATIVE_ALIASES
+#include <simde/x86/sse2.h>
+#if !defined(SIMDE_X86_SSE_NATIVE) && !defined(SIMDE_MATH_SLEEF_ENABLE)
+HEDLEY_DIAGNOSTIC_PUSH
+ #if HEDLEY_HAS_WARNING("-Wreserved-id-macro")
+ _Pragma("clang diagnostic ignored \"-Wreserved-id-macro\"")
+ #endif
+# define _MM_HINT_T0 1
+# define _MM_HINT_T1 2
+# define _MM_HINT_T2 3
+HEDLEY_DIAGNOSTIC_POP
+#endif
typedef int64_t _int64;
typedef uint64_t _uint64;
|