From 24d23ffbb84ab469134e3a5b2fb62d1a68f606e9 Mon Sep 17 00:00:00 2001 From: Brendan McDonnell Date: Wed, 7 Aug 2019 12:04:03 -0400 Subject: [PATCH 1/3] whitespace --- kiss_fft.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kiss_fft.h b/kiss_fft.h index 1ca0b45..a6afde7 100644 --- a/kiss_fft.h +++ b/kiss_fft.h @@ -34,12 +34,12 @@ extern "C" { #ifdef USE_SIMD # include # define kiss_fft_scalar __m128 -#define KISS_FFT_MALLOC(nbytes) _mm_malloc(nbytes,16) -#define KISS_FFT_FREE _mm_free -#else -#define KISS_FFT_MALLOC malloc -#define KISS_FFT_FREE free -#endif +# define KISS_FFT_MALLOC(nbytes) _mm_malloc(nbytes,16) +# define KISS_FFT_FREE _mm_free +#else +# define KISS_FFT_MALLOC malloc +# define KISS_FFT_FREE free +#endif #ifdef FIXED_POINT From 033f759ee37cbddd2d1cbad5cf05bb296815164f Mon Sep 17 00:00:00 2001 From: Brendan McDonnell Date: Wed, 7 Aug 2019 12:07:02 -0400 Subject: [PATCH 2/3] Allow user override of KISS_FFT_MALLOC and/or KISS_FFT_FREE on non-SIMD platforms --- kiss_fft.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/kiss_fft.h b/kiss_fft.h index a6afde7..b9eed60 100644 --- a/kiss_fft.h +++ b/kiss_fft.h @@ -37,8 +37,13 @@ extern "C" { # define KISS_FFT_MALLOC(nbytes) _mm_malloc(nbytes,16) # define KISS_FFT_FREE _mm_free #else -# define KISS_FFT_MALLOC malloc -# define KISS_FFT_FREE free +/* user may override KISS_FFT_MALLOC and/or KISS_FFT_FREE */ +# ifndef KISS_FFT_MALLOC +# define KISS_FFT_MALLOC malloc +# endif +# ifndef KISS_FFT_FREE +# define KISS_FFT_FREE free +# endif #endif From d06e7a710673eb9e9d9b2df3bc1bd106187e21b7 Mon Sep 17 00:00:00 2001 From: Brendan McDonnell Date: Wed, 7 Aug 2019 12:10:01 -0400 Subject: [PATCH 3/3] Allow user override of KISS_FFT_MALLOC and/or KISS_FFT_FREE on SIMD platforms --- kiss_fft.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/kiss_fft.h b/kiss_fft.h index b9eed60..ed6e24a 100644 --- a/kiss_fft.h +++ b/kiss_fft.h @@ -31,13 +31,17 @@ extern "C" { in the tools/ directory. */ +/* User may override KISS_FFT_MALLOC and/or KISS_FFT_FREE. */ #ifdef USE_SIMD # include # define kiss_fft_scalar __m128 -# define KISS_FFT_MALLOC(nbytes) _mm_malloc(nbytes,16) -# define KISS_FFT_FREE _mm_free +# ifndef KISS_FFT_MALLOC +# define KISS_FFT_MALLOC(nbytes) _mm_malloc(nbytes,16) +# endif +# ifndef KISS_FFT_FREE +# define KISS_FFT_FREE _mm_free +# endif #else -/* user may override KISS_FFT_MALLOC and/or KISS_FFT_FREE */ # ifndef KISS_FFT_MALLOC # define KISS_FFT_MALLOC malloc # endif