CUFFT

Hi, I would like to compute the FFT of same data through the use of CUFFT libraries, I have read the guide of nvidia on this topic, but I don’t understand:
1)What is a plan.
2)The type cufftHandle.
Thanks.

A CUFFT plan is correspondent to the plans in FFTW. Generally it’s a guide telling FFT library what radix to choose when dividing the transformation, and what “modules” to use. If you read FFTW source codes you’ll find that its basic blocks are some hard-coded transformation kernels for bases like 2, 5 or 7. A plan is composed of some of these basic blocks in order to gain maximum performance.

cufftHandle is a pointer to such plans.

Paola,

note that since a plan only depends on the array size and the transform type (i.e.: Complex2Complex), you only need to compute it once for a given problem.

So if you have such a scenario:

for i from 0 to N
(
FFT (array[i]) // cufftExec
dosomething
ReverseFFT(array[i]) // cufftExec
)

you can compute the plan just once, off-cycle, and then use it for every “i”, for both forward and reverse FFT.
This way you’ll get better performances, since cufftPlan takes some GPU time.

Fernando

Is it possible to use cufft with streams?