Data layout on device of the output from cufftExecR2C


I am trying to write a code in which I have a 3D real matrix with data, I want to obtain the fourier transform, multiply it with a filter and then make the inverse transform. For example if I have a matrix with only one non-zero element equal to one and I use a filter of the form 2*(cos(kz)-1) the results would be 0 1 -2 1 0 along the z direction.