Allow user override of KISS_FFT_MALLOC and/or KISS_FFT_FREE on SIMD platforms

This commit is contained in:
Brendan McDonnell 2019-08-07 12:10:01 -04:00
parent 033f759ee3
commit d06e7a7106

View File

@ -31,13 +31,17 @@ extern "C" {
in the tools/ directory. in the tools/ directory.
*/ */
/* User may override KISS_FFT_MALLOC and/or KISS_FFT_FREE. */
#ifdef USE_SIMD #ifdef USE_SIMD
# include <xmmintrin.h> # include <xmmintrin.h>
# define kiss_fft_scalar __m128 # define kiss_fft_scalar __m128
# define KISS_FFT_MALLOC(nbytes) _mm_malloc(nbytes,16) # ifndef KISS_FFT_MALLOC
# define KISS_FFT_FREE _mm_free # define KISS_FFT_MALLOC(nbytes) _mm_malloc(nbytes,16)
# endif
# ifndef KISS_FFT_FREE
# define KISS_FFT_FREE _mm_free
# endif
#else #else
/* user may override KISS_FFT_MALLOC and/or KISS_FFT_FREE */
# ifndef KISS_FFT_MALLOC # ifndef KISS_FFT_MALLOC
# define KISS_FFT_MALLOC malloc # define KISS_FFT_MALLOC malloc
# endif # endif