program hpftest c c This program calls the MPL library spfft. c integer dimx parameter (dimx=65536) complex x(0:dimx-1) integer ctrl integer i, trszx c MPL subroutines CMPF MPL fft_init, sp_fft, fft_free c Initialize forall (i=0:dimx-1) x(i) = cmplx(i,-i) write(*,*) 'Give transform length:' read(*,*) trszx c call fft_init (ctrl,mode,numdim,dimx,trszx,dimy,trszy, c dimz,trszz) call fft_init ( ctrl, 0, 1, dimx, trszx, 0, 0, 0, 0) write(*,*) 'Input:' write(*,*) 'x(0) =', x(0) write(*,*) 'x(1) =', x(1) write(*,*) 'x(456) =', x(456) write(*,*) 'x(457) =', x(457) write(*,*) 'x(32000) =', x(32000) c Forward 1-D transform call sp_fft(x,1,ctrl) write(*,*) 'After FFT:' write(*,*) 'x(0) =', x(0) write(*,*) 'x(1) =', x(1) write(*,*) 'x(456) =', x(456) write(*,*) 'x(457) =', x(457) write(*,*) 'x(32000) =', x(32000) c Inverse 1-D transform call sp_fft(x,-1,ctrl) write(*,*) 'After inverse FFT:' write(*,*) 'x(0) =', x(0) write(*,*) 'x(1) =', x(1) write(*,*) 'x(456) =', x(456) write(*,*) 'x(457) =', x(457) write(*,*) 'x(32000) =', x(32000) c Free temporry data structures call fft_free(ctrl) end