diff options
Diffstat (limited to 'NaiveFFT/fft.h')
-rw-r--r-- | NaiveFFT/fft.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/NaiveFFT/fft.h b/NaiveFFT/fft.h index f1ee783..80ae6cc 100644 --- a/NaiveFFT/fft.h +++ b/NaiveFFT/fft.h @@ -11,10 +11,21 @@ #include <stdlib.h> #include <stdio.h> #include <math.h> +#include <stdint.h> +#include <unistd.h> +#if __EMSCRIPTEN__ +#include <emscripten/emscripten.h> +#endif -void fft_if(double *x_i, double *x_q, int n, int inv); -void ffti_shuffle_1(double *x_i, double *x_q, uint64_t n); -void fft_1(double *x_i, double *x_q, uint64_t n, uint64_t inv); -void dft(double *x_i, double *x_q, int n, int inv); +#ifdef __EMSCRIPTEN__ +#define KEEPALIVE EMSCRIPTEN_KEEPALIVE +#else +#define KEEPALIVE +#endif + +void KEEPALIVE fft_if(double *x_i, double *x_q, int n, int inv); +void KEEPALIVE ffti_shuffle_1(double *x_i, double *x_q, uint64_t n); +void KEEPALIVE fft_1(double *x_i, double *x_q, uint64_t n, uint64_t inv); +void KEEPALIVE dft(double *x_i, double *x_q, int n, int inv); #endif /* fft_h */ |