I need help for inverse 2D FFT

Hallo @ all,

I use the cuda 4.0 compiler and the cuda 4.0 cufft library. If I use the inverse 2D CUFFT_Z2Z function, then I get an incorrect result. The imaginary part of the result is always 0. I cant believe this. I checked the complex input data, but i cant find a mistake.

Here is my code:

int NX =512;
int NY = 512;

cufftHandle Inverse_2D_FFT_Plan;

cufftSafeCall( cufftPlan2d(&Inverse_2D_FFT_Plan, NX, NY, CUFFT_Z2Z) );

cufftSafeCall( cufftExecZ2Z(Inverse_2D_FFT_Plan, idata, odata, CUFFT_INVERSE) );

If I use the inverse 2D CUFFT_Z2Z function then the imaginary part of the result is always 0. --> Is this a knowing error?

Put here also how you initialize the matrix idata and how do you check the imaginary part of the result.