I can’t get the right copying of the 3d array with padding. Point is to pad 3d array of floats to 3d array of complex to do in-place FFT. I am attaching my code for out-of-place FFT, and an attempt at in-place-fft. The main problem is with setting parameters to cudaMemcpy3D. Please help.