views:

248

answers:

5

Hi,

does anyone know an implementation of the inverse FFT in HLSL/GLSL/cg ... ?

It would save me much work.

Best, heinrich

+2  A: 

Do you already have a FFT implementation? You may already be aware, but the inverse can be computed by reversing the order of the N inputs, taking the FFT over those, and dividing the result by N.

PeterAllenWebb
+1  A: 

Unfortunately I don't have any FFT implementation :/

Heinrich
+2  A: 

DirectX11 comes with a FFT example for compute shaders (see DX11 August SDK Release Notes). As PereAllenWebb points out, this can be also used for inverse FFT.

Edit: If you just want a fast FFT, you could try the CUFFT, which runs on the GPU. It's part of the CUDA SDK. The AMCL from AMD also has a FFT, which is currently not GPU accelerated, but this will be likely added soon.

Anteru
M-O-U-S-E... :-)
RBarryYoung
A: 

Maybe you could take a look at OpenCL which is a standard for general purpose computing on graphics (and other) hardware.
The wikipedia article contains a OpenCL example for a standard FFT:
http://en.wikipedia.org/wiki/OpenCL#Example

If you are on a Mac with OS X 10.6, you just need to install the developer tools to get started with OpenCL development. I also heard that hardware vendors already provide basic OpenCL driver support on Windows.

weichsel
I guess opencl under windows is supported by nvidia using CUDA.
Heinrich
Thanks for the hint! I just found that AMD also provides an SDK called "ATI Stream" which offers OpenCL support. http://developer.amd.com/gpu/ATIStreamSDKBetaProgram/Pages/default.aspx
weichsel
A: 

Thanks for your answers, all of you. Using CUDA or OpenCL is a good idea. I already thought about it, maybe I'll give it a try. Has anyone made experiences about the interopability between CUDA and DirectX ? Is the Directx11 shader sample already running under Directx 10 ?

Heinrich
Generally you shouldn't write responses to other people's answers in the form of answers yourself. Use comments (to reply to specific answers) or edit your question to do a general response (adding something like "EDIT: [blah blah blah]" at the bottom, or something like that).
Platinum Azure
Ah okay. I was not aware how the music playe at stackoverflow. thanks!
Heinrich