#include #include #include #include #include "kiss_fft.h" #include "pstats.h" int main(int argc,char ** argv) { int nfft=1024; int isinverse=0; int numffts=1000,i; kiss_fft_cpx * buf; kiss_fft_cpx * bufout; kiss_fft_cfg st; while (1) { int c = getopt (argc, argv, "n:ix:"); if (c == -1) break; switch (c) { case 'n': nfft = atoi (optarg); break; case 'x': numffts = atoi (optarg); break; case 'i': isinverse = 1; break; } } #ifdef USE_SIMD buf=(kiss_fft_cpx*)memalign(sizeof(kiss_fft_cpx),sizeof(kiss_fft_cpx) * nfft); bufout=(kiss_fft_cpx*)memalign(sizeof(kiss_fft_cpx),sizeof(kiss_fft_cpx) * nfft); numffts /= 4; fprintf(stderr,"since SIMD implementation does 4 ffts at a time, numffts is being reduced to %d\n",numffts); #else buf=(kiss_fft_cpx*)malloc(sizeof(kiss_fft_cpx) * nfft); bufout=(kiss_fft_cpx*)malloc(sizeof(kiss_fft_cpx) * nfft); #endif for (i=0;i