mirror of
https://github.com/mborgerding/kissfft.git
synced 2025-05-27 21:20:27 -04:00
Merge pull request #28 from bmcdonnell-ionx/user-override-malloc
Allow user override of malloc and/or free
This commit is contained in:
commit
3050076ab3
17
kiss_fft.h
17
kiss_fft.h
@ -31,14 +31,23 @@ 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
|
||||||
#define KISS_FFT_MALLOC malloc
|
# ifndef KISS_FFT_MALLOC
|
||||||
#define KISS_FFT_FREE free
|
# define KISS_FFT_MALLOC malloc
|
||||||
|
# endif
|
||||||
|
# ifndef KISS_FFT_FREE
|
||||||
|
# define KISS_FFT_FREE free
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user