I am trying to apply 1D FFT to a 3D matrix along a single direction. Below is the code I am currently using. It has a nested loop to loop through the other 2 dimensions. It works but I am just wondering if there is any ways to speedup this code. The size of the FFT is typically under 1024 points.
status = DftiCreateDescriptor(hFFT,DFTI_DOUBLE,DFTI_COMPLEX,1,nFFT) status = DftiSetValue(hFFT,DFTI_COMPLEX_STORAGE,DFTI_REAL_REAL) status = DftiCommitDescriptor(hFFT) do j = 1,nz do i = 1,ny status = DftiComputeForward(hFFT,datarel(:,i,j),dataimg(:,i,j)) end do end do status = DftiFreeDescriptor(hFFT)