c@409: #include c@409: #include c@409: #include c@409: #include c@409: #include "kiss_fft.h" c@409: #include "kiss_fftr.h" c@409: #include "kiss_fftnd.h" c@409: #include "kiss_fftndr.h" c@409: c@409: #include "pstats.h" c@409: c@409: static c@409: int getdims(int * dims, char * arg) c@409: { c@409: char *s; c@409: int ndims=0; c@409: while ( (s=strtok( arg , ",") ) ) { c@409: dims[ndims++] = atoi(s); c@409: //printf("%s=%d\n",s,dims[ndims-1]); c@409: arg=NULL; c@409: } c@409: return ndims; c@409: } c@409: c@409: int main(int argc,char ** argv) c@409: { c@409: int k; c@409: int nfft[32]; c@409: int ndims = 1; c@409: int isinverse=0; c@409: int numffts=1000,i; c@409: kiss_fft_cpx * buf; c@409: kiss_fft_cpx * bufout; c@409: int real = 0; c@409: c@409: nfft[0] = 1024;// default c@409: c@409: while (1) { c@409: int c = getopt (argc, argv, "n:ix:r"); c@409: if (c == -1) c@409: break; c@409: switch (c) { c@409: case 'r': c@409: real = 1; c@409: break; c@409: case 'n': c@409: ndims = getdims(nfft, optarg ); c@409: if (nfft[0] != kiss_fft_next_fast_size(nfft[0]) ) { c@409: int ng = kiss_fft_next_fast_size(nfft[0]); c@409: fprintf(stderr,"warning: %d might be a better choice for speed than %d\n",ng,nfft[0]); c@409: } c@409: break; c@409: case 'x': c@409: numffts = atoi (optarg); c@409: break; c@409: case 'i': c@409: isinverse = 1; c@409: break; c@409: } c@409: } c@409: int nbytes = sizeof(kiss_fft_cpx); c@409: for (k=0;k