From d06e7a710673eb9e9d9b2df3bc1bd106187e21b7 Mon Sep 17 00:00:00 2001 From: Brendan McDonnell Date: Wed, 7 Aug 2019 12:10:01 -0400 Subject: [PATCH] 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