Signed-off-by: falkTX <falktx@falktx.com>tags/v1.0
@@ -0,0 +1,25 @@ | |||||
--- fftw3-static-3.3.5~git20160520.orig/api/apiplan.c | |||||
+++ fftw3-static-3.3.5~git20160520/api/apiplan.c | |||||
@@ -19,8 +19,21 @@ | |||||
*/ | |||||
#include "api/api.h" | |||||
+#include <pthread.h> | |||||
-static planner_hook_t before_planner_hook = 0, after_planner_hook = 0; | |||||
+static pthread_mutex_t planner_mutex = PTHREAD_MUTEX_INITIALIZER; | |||||
+ | |||||
+static void lock_planner_mutex(void) | |||||
+{ | |||||
+ pthread_mutex_lock(&planner_mutex); | |||||
+} | |||||
+ | |||||
+static void unlock_planner_mutex(void) | |||||
+{ | |||||
+ pthread_mutex_unlock(&planner_mutex); | |||||
+} | |||||
+ | |||||
+static planner_hook_t before_planner_hook = lock_planner_mutex, after_planner_hook = unlock_planner_mutex; | |||||
void X(set_planner_hooks)(planner_hook_t before, planner_hook_t after) | |||||
{ |
@@ -0,0 +1,10 @@ | |||||
--- fftw3-static-3.3.5~git20160520.orig/fftw.pc.in | |||||
+++ fftw3-static-3.3.5~git20160520/fftw.pc.in | |||||
@@ -6,6 +6,6 @@ includedir=@includedir@ | |||||
Name: FFTW | |||||
Description: fast Fourier transform library | |||||
Version: @VERSION@ | |||||
-Libs: -L${libdir} -lfftw3@PREC_SUFFIX@ @LIBQUADMATH@ | |||||
+Libs: -L${libdir} -lfftw3@PREC_SUFFIX@ @LIBQUADMATH@ -lpthread -lm | |||||
Libs.private: -lm | |||||
Cflags: -I${includedir} |
@@ -0,0 +1,59 @@ | |||||
diff --git a/simd-support/neon.c b/simd-support/neon.c | |||||
index 196959c..fe04dd4 100644 | |||||
--- a/simd-support/neon.c | |||||
+++ b/simd-support/neon.c | |||||
@@ -23,54 +23,9 @@ | |||||
#if HAVE_NEON | |||||
-/* check for an environment where signals are known to work */ | |||||
-#if defined(unix) || defined(linux) | |||||
- # include <signal.h> | |||||
- # include <setjmp.h> | |||||
- | |||||
- static jmp_buf jb; | |||||
- | |||||
- static void sighandler(int x) | |||||
- { | |||||
- UNUSED(x); | |||||
- longjmp(jb, 1); | |||||
- } | |||||
- | |||||
- static int really_have_neon(void) | |||||
- { | |||||
- void (*oldsig)(int); | |||||
- oldsig = signal(SIGILL, sighandler); | |||||
- if (setjmp(jb)) { | |||||
- signal(SIGILL, oldsig); | |||||
- return 0; | |||||
- } else { | |||||
- /* paranoia: encode the instruction in binary because the | |||||
- assembler may not recognize it without -mfpu=neon */ | |||||
- /*asm volatile ("vand q0, q0, q0");*/ | |||||
- asm volatile (".long 0xf2000150"); | |||||
- signal(SIGILL, oldsig); | |||||
- return 1; | |||||
- } | |||||
- } | |||||
- | |||||
- int X(have_simd_neon)(void) | |||||
- { | |||||
- static int init = 0, res; | |||||
- | |||||
- if (!init) { | |||||
- res = really_have_neon(); | |||||
- init = 1; | |||||
- } | |||||
- return res; | |||||
- } | |||||
- | |||||
- | |||||
-#else | |||||
-/* don't know how to autodetect NEON; assume it is present */ | |||||
int X(have_simd_neon)(void) | |||||
{ | |||||
return 1; | |||||
} | |||||
-#endif | |||||
#endif |
@@ -0,0 +1 @@ | |||||
fftw |