Performing an FFT using C++ AMP RRS feed

  • Question

  • In Direct3D we have the ability to perform 1, 2 or 3D FFTs using the D3DX11CreateFFTxxx etc.

    Is there a way to access this functionality when using C++ AMP or do I have to write my own code in a kernal to implement the calculation?


    Thanks in Advance



    Friday, October 21, 2011 2:29 PM


All replies

  • Hi Mark,

    The D3D FFT functions can't be directly used from a C++ AMP kernel.

    I haven't tried this, but since ID3DDX11FFT interface operates on unordered access views, it should be possible to perform these FFT transformations outside of a kernel, and then use these UAV's to create C++ AMP arrays to do further computations on.  If you try this, let us know how it works.


    • Marked as answer by PTRMark Saturday, October 22, 2011 1:53 AM
    Friday, October 21, 2011 10:34 PM
  • Don,

    Thanks for the suggestion - it didn't occur to me to mix DirectCompute and C++ AMP in the same application.

    Kind Regards


    Saturday, October 22, 2011 1:52 AM
  • Don,

    I am not aware of mixing DirectCompute & AMP either. The application I am working on involves lots of Texture2D and UAVs, which are not directly supported in C++ AMP. Could you elaborate on the approach of mixing C++ AMP & DirectCompute, or even show some code examples?



    Saturday, October 22, 2011 3:45 AM
  • Hi Mark & lakeeast,

    If you look at discussion here:

    It talks a little bit about the interop support between C++ AMP and Direct3D (not just DirectCompute). The main requirement is that the C++ Array and ID3D11Buffer can interop only if the buffer is a structured buffer with stride of 4 bytes.  In the preview bits, there are some other requirements that we are looking to relax.






    Saturday, October 22, 2011 6:36 PM
  • Mark, we now have a wrapper for FFT which means you do not need to do the interop yourself, so please check it out:
    Friday, November 18, 2011 2:29 AM