replacing FFTW calls CUDA FFT library


I am trying to replace FFTW calls within an application by CUDA FFT calls and getting runtime errors. My first questions is whether the CUDA FFT library could be used as the simpleCUBLAS example, i.e. whether the FFT functions could be setup and called from a C/C++ file. I am making use of cudaMalloc, cudaMemcpy, cufftPlan1d, cufftExecC2C, cudaMemcpy, cudaFree, and cufftDestroy calls (like the 1D C2C transform example in the CUDA FFT manual). My second question is about the equivalent CUDA FFT call for the following FFTW call:

void fftw(fftw_plan plan, int howmany, FFTW_COMPLEX *in, int istride, int idist, FFTW_COMPLEX *out, int ostride, int odist)

Since the CUDA call looks quite different

cufftExecC2C( cufftHandle plan, cufftComplex *idata, cufftComplex *odata, int direction )

especially if the *out is NULL and the values of ‘howmny’ are changed between calls. should it be called within a loop?

Appreciate any help!