I am working on some code which takes linear sequence of data like the following: (Xn are real numbers and the zeroes are added for padding purpose … to be used later in convolution)
[font=“Courier New”]0 X1 0 0 X2 0 0 X3 0 0 X4 0 0 X5 0 0 X6 0 0 X7 …[/font]
I am applying an R2C transform using cufft … but the output (complex) I obtain is of the form
[font=“Courier New”]R1 + i, R2 + i, R3 + i, R4 + i, R5 + i, …, 0 + 0i, 0 + 0i, 0 + 0i, 0 + 0i, 0 + 0i, 0 + 0i, 0 + 0i[/font]
The CPU implementation shows the frequency sequence exactly as the time sequence (i.e., 0 + 0i between the complex numbers). Does anybody have an idea why cuFFT is placing all zeroes at the end of the spectrum? This must be GPU specific because I have also used FFT through OpenCL with the same outcome. I have also used CUFFT_COMPATIBILITY_FFTW_PADDING but it also has no effect.