Difference between revisions of "FFT Cuda"

From ElphelWiki
Jump to: navigation, search
Line 10: Line 10:
 
* Inverse FFT of the result
 
* Inverse FFT of the result
 
* Save 128x128 window to the n'th position in the TIFF
 
* Save 128x128 window to the n'th position in the TIFF
 +
 +
 +
=== Knowledge required ===
 +
CuFFT is modeled after FFTW. To create a new operation we start with cufftPlan2d. The actual operation happens wth cufftExecC2C. cufftExecC2C takes input and output data, respectivily idata and odata in GPU memory.
 +
 +
To use the GPU memory use cudaMalloc.
 +
 +
How to copy from 'CPU' memory to 'GPU' memory?

Revision as of 17:02, 4 November 2010

Input

  • Image is presented in TIFF file structure
  • Array of, FFT of kernels (64x64)

Todo

  • Take a windows 128x128, step by 32 pixels
  • Make a FFT (DFT_2D)
  • Get nth-kernel, pad 32px zero's to each side
  • Multiply FFT with kernel
  • Inverse FFT of the result
  • Save 128x128 window to the n'th position in the TIFF


Knowledge required

CuFFT is modeled after FFTW. To create a new operation we start with cufftPlan2d. The actual operation happens wth cufftExecC2C. cufftExecC2C takes input and output data, respectivily idata and odata in GPU memory.

To use the GPU memory use cudaMalloc.

How to copy from 'CPU' memory to 'GPU' memory?