CUFFT2D and 2Dstructures allocated wiht cudamallocPitch

Hi all,

i’m wondering if it is possible to use 2d structures allocated with cudamallocpitch that are properly sized with a pitch in cufft calls.

Does CUFFT manages pitches of input and output data structures? If so, how does it do it, as no information about the pitches is requirend in the cufft call?

For instance, I have:

cudaMallocPitch((void**)&u_fft, &pitch_u_fft, cN2cuSizeC,c*N1);

cufftResult result = cufftPlan2d(&plan, cN1,cN2, CUFFT_C2C);
cufftExecC2C(plan, u_buffer, u_fft, CUFFT_FORWARD);

Can I use cufft with the 2D structure without providing the pitch_u_fft? If so, It sounds strange.
Please help me to understand if i can do it.

Thank you.

I’m pretty sure that what you want to do is NOT possible. I haven’t tested it (that would be easy though, just compare the results with a cufft on the same data in a contiguously stored array), but e.g. pointer arithmetic works the same on pointers allocated with MallocPitch as on pointers allocated with Malloc, so I suppose you’re out of luck.