#include "fft.h"

#define X_SIZE 256
#define Y_SIZE 256

main()
        {
        int i,max;
        unsigned int st;
        COMPLEX *c = create_complex(X_SIZE,Y_SIZE);

        for(i=0; i<X_SIZE*Y_SIZE; ++i) { c->real[i] = i; c->imag[i]=0; }

        printf("start\n"); fflush(stdout);
        st = time(0);
        max=10000;
        for(i=0; i<max; ++i) {
           if ((i%10)==0) printf("%0d%%  \r",i*100/max); fflush(stdout);
           FFT2D(c,FFT_FORWARD|FFT_REAL|FFT_NO_BRT);
           }

        //for(i=0; i<X_SIZE*Y_SIZE; ++i) printf("%lf %lf\n",(double)c->real[i],(double)c->imag[i]);

        printf("Finished, elapsed = %ld\n",time(0)-st);
        destroy_complex(c);
        exit(0);
        }

