CuFFTPlan3D bugs? Are the dimensions reversed?

I’ve been having all sorts of problems trying to get the 3D FFT to work and give sensible answers. However, as soon as I reversed the dimensions and changed the plan to be:

 cufftPlan3d(&plan, NZ, NY, NX, CUFFT_R2C); // NX=512, NY=512, NZ=128

everything worked correctly, despite what the manual says (NX,NY,NZ).

So I can’t believe this hasn’t been noticed before. I thought I had the latest releases and documentation for CuFFT v1.1.

Anyone else had the same problem/solution?


It depends on whether your input is in row or column major, you can find more information about it on page 4 of the CUFFT v1.1 manual