I am using the CUFFT library to do what should be a simple FFT, IFFT.
Here’s the gist of it:
cufftExecR2C(forwardFFTPlan, d_img, d_fft_img); print(d_fft_img); cufftExecC2R(inverseFFTPlan, d_fft_img, d_img); print(d_fft_img);
What I am noticing is that d_fft_img is different in the second print call, leading me to to believe that cufft is destroying its input data. However, I can’t find this mentioned anywhere in the documentation, and it seems like the kind of thing you would want to document. I scoured the forums and found only one other person mentioning the same issue, without a definitive answer.
Does anyone know for certain, one way or another, if the CUFFT functions (namely, C2R) ruin their input data?
Or can you offer any other plausible explanation as to why this would be happening?
Thanks in advance for any help, suggestions, or ideas.
First, thanks to the people who have commented so far.
A few clarifications I should have made the first time around:
- the results of each transform are correct
- there’s nothing before, after, or in between these two calls - something else modifying the data is a non-issue.
- “print” is a simplification here - I’m not accidentally printing the address of the pointer, or cpu mem instead of gpu mem, or anything like that : )
- again, thanks for any input