CUFFT & 2D textures

I am implementing a processing chain which needs a 2D FFT in the middle. The best performing method for the rest of the algorithm is to use 2D textures since locality of reference is very high.

The FFT lib appears to only take normal cudaMalloc() buffers. What’s the fastest way to perform a 2D FFT on a 2D texture and get the results back into a 2D texture?

If you want to use the cuFFT library, you will need to copy from/to the texture with cuMemCpyAtoD and cuMemCpyDtoA.

You will need to write your own FFT code to avoid the copy.

We will do that eventually.

Thank you for the confirmation.