CUDA FFT Aug 2010 cufftPlan1d could use clarification as to N for inverse transforms ... and an exa

Ok so I know I should have known better, but if someone finds this useful it will probably save them the gobs of time which I wasted that it took me to figure out. A simple example of R2C → filter(multiply) → C2R transform example would have helped me I am sure for cudaPlan1d.

Reading the “CUFFT Transform Types” section and looking at the examples at the end of the August 2010 CUFFT library left me thinking that I need to pass N = NUM_ELEMENTS to the plan creation for the R2C and Nfft = N/2+1 (number of complex elements) to the plan creation for the C2R. This however gave me back gobs of corrupted 1D transforms in a 3D volume I was transforming (y * z = batch number of fft’s in the x dimension). Anyway I would ask that the statement:

be clarified to specify that nx here is the number of elements in the real domain not the number of elements in the complex domain being inverse transformed. Maybe this is clear to everyone else including the author of the documentation, but it sure wasn’t to me. A simple inverse transform on page 25 expanding on the 1D Real-to-Complex Transforms example would have been helpful… hey there is a whole half of a page here which I am sure could contain the 5 lines of code that would clarify this. Hope this helps some one out there in weblandia.