Cuda FFT and Inverse FFT

Hello ,

I am quite new to CUDA and FFT and as a first step I began with LabVIEW GPU toolkit (uses CUDA).

My issue concerns inverse FFT . To test FFT and inverse FFT I am simply generating a sine wave and passing it to the FFT function and then the FFT to inverse FFT . My setup is as follows :

FFT :

Data is originally in double , it is prepared into complex single.
Array is 1024*1024 where each row is a sine wave with a specific frequency.

FFT type : CUFFT_C2C
Batch Size : 1024
FFT size : 1024

Inverse FFT :

Spectrums is in Complex Single.
Array is 1024*1024 where each row is a sine wave with a specific frequency.

IFFT type : CUFFT_C2R
Batch Size : 1024
FFT size : 1024
Output spectrum from the FFT function is then passed onto inverse FFT , expecting to observe the same sine wave.

But I see something different , the first row of original sinewave and inverse FFT correspond . Rest of the signals don’t , they look weird. PF images highlighting the issue :

Hopefully , it is something basic that i’ve overseen . Any help with this issue would be appreciated .

Best ,

You may get better help on a labview forum (somewhere).

C2R transforms are tricky with the data layout IIRC, it’s been a long time. Any reason why you cannot use C2C on the IFFT? I recently did this to test and just compared the values numerically, they are the same…