Question

Is there anybody who knows how I can replace these APIs from fftw by Kiss-fft APIs?

fftw_plan fftw_plan_dft_r2c_2d(int n0, int n1,double *in, fftw_complex *out,unsigned flags);
fftw_plan fftw_plan_dft_c2r_1d(int n0,fftw_complex *in, double *out,unsigned flags);
Was it helpful?

Solution

For the first case (2D real-to-complex FFT) you need to use the API in tools/kiss_fftndr.h:

kiss_fftndr_cfg  kiss_fftndr_alloc(const int *dims,int ndims,int inverse_fft,void*mem,size_t*lenmem);
void kiss_fftndr(
        kiss_fftndr_cfg cfg,
        const kiss_fft_scalar *timedata,
        kiss_fft_cpx *freqdata);
void kiss_fftndri(
        kiss_fftndr_cfg cfg,
        const kiss_fft_cpx *freqdata,
        kiss_fft_scalar *timedata);

For the second case (1D complex-to-real FFT) you need to use the API in tools/kiss_fftr.h:

kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem);
void kiss_fftr(kiss_fftr_cfg cfg,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata);
void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top