Search code examples
cudacufft

How can I get the full fft coefficients by cufft?


I am doing two dimensional fft process by cufft. Processing type is real to complex, so the size of out array is NX * (NY / 2 + 1) which is non redundant. But I need the full coefficients containing the redundant ones. How can i get them all? Thanks in advance.


Solution

  • Convert all your real values to complex values. This is trivial and simply involves providing a zero imaginary value to go along with each real value.

    Then do a cufft C2C (complex to complex) transform, which will be of size NX*NY, both on the input size, and the output side. There will be no reduction for redundancy.