michael@0: #ifndef KISS_FTR_H michael@0: #define KISS_FTR_H michael@0: michael@0: #include "kiss_fft.h" michael@0: #ifdef __cplusplus michael@0: extern "C" { michael@0: #endif michael@0: michael@0: michael@0: /* michael@0: michael@0: Real optimized version can save about 45% cpu time vs. complex fft of a real seq. michael@0: michael@0: michael@0: michael@0: */ michael@0: michael@0: typedef struct kiss_fftr_state *kiss_fftr_cfg; michael@0: michael@0: michael@0: kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem); michael@0: /* michael@0: nfft must be even michael@0: michael@0: If you don't care to allocate space, use mem = lenmem = NULL michael@0: */ michael@0: michael@0: michael@0: void kiss_fftr(kiss_fftr_cfg cfg,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata); michael@0: /* michael@0: input timedata has nfft scalar points michael@0: output freqdata has nfft/2+1 complex points michael@0: */ michael@0: michael@0: void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata); michael@0: /* michael@0: input freqdata has nfft/2+1 complex points michael@0: output timedata has nfft scalar points michael@0: */ michael@0: michael@0: #define kiss_fftr_free free michael@0: michael@0: #ifdef __cplusplus michael@0: } michael@0: #endif michael@0: #endif