<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: What FFT methods should I use? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/What-FFT-methods-should-I-use/m-p/1717726#M37347</link>
    <description>&lt;P&gt;Thank you for posting in the forum!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;However, in spite of the fact all my data is real, I had to allocate a complex array to go from spectral to grid point space.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;gt; Actually you don't have to allocate a complex array. In ${MKLROOT}/include/mkl_dfti.h, the compute API is declared as "DFTI_EXTERN MKL_LONG DftiComputeForward(DFTI_DESCRIPTOR_HANDLE, void*, ...);", the arrays got passed as void pointers. So, for example, if using &lt;STRONG&gt;&lt;EM&gt;double* a&lt;/EM&gt;&lt;/STRONG&gt; to store the complex data in &lt;STRONG&gt;&lt;EM&gt;MKL_Complex16&amp;nbsp;*b&lt;/EM&gt;&lt;/STRONG&gt;, a[0] takes b[0].real, a[1] takes b[0].imag, a[2] takes b[1].real, ...&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Sep 2025 20:46:16 GMT</pubDate>
    <dc:creator>Fengrui</dc:creator>
    <dc:date>2025-09-18T20:46:16Z</dc:date>
    <item>
      <title>What FFT methods should I use?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/What-FFT-methods-should-I-use/m-p/1717303#M37339</link>
      <description>&lt;P&gt;I have a spectral transform model that every time step has to&lt;/P&gt;&lt;P&gt;1. transform spectral components to grid point data&lt;/P&gt;&lt;P&gt;2. Do nonlinear computations in grid point space&lt;/P&gt;&lt;P&gt;3. transform back to spectral space.&lt;/P&gt;&lt;P&gt;The spectral components are all real, using eigenfunctions&lt;/P&gt;&lt;P&gt;streamfunction(k,l) = a(k,l)cosknxsinly + b(k,l)sinknxsinly + cosly&lt;/P&gt;&lt;P&gt;Derivatives are taken for the Jacobian so I will also have to transform&lt;BR /&gt;d/dy = a(k,l)cosknxcosly + b(k,l)sinknxcosly + sinly&lt;/P&gt;&lt;P&gt;The domain is periodic in x and bounded in y with range y=0 to y=pi.&lt;/P&gt;&lt;P&gt;The model is written but used the old F77 FFT991 FFT routines. I wanted to update to F90+ at least.&lt;/P&gt;&lt;P&gt;I started with FFTW3 but ran into problems so I downloaded MKL and started with the DFTI methods. However, in spite of the fact all my data is real, I had to allocate a complex array to go from spectral to grid point space. I have many arrays in this project and they are all real and are allocated and constructed using pointers.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Then I saw the TT methods in the partial differential equations helpers. That is exactly what I am integrating so I thought this was good. But as far as I could tell I had to revert to using the DFTI routines for at least one set of these transforms (likely spectral to grid data) which meant allocating complex arrays again.&lt;BR /&gt;&lt;BR /&gt;So I gave up and went back to FFTW3 but could only get a precompiled version for Windows for 3.3.5 which is aways behind 3.3.10. Building them myself seemed painfully complicated so I went for the FFTW3 wrappers in the MKL. As far as I can tell, this appears to be my best solution if I don't want to reconstruct my arrays to be complex (with wasted space).&lt;/P&gt;&lt;P&gt;Seems funny I would have to do this. Maybe I misunderstood the TT options and they can apply to my case using all real arrays ...?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Sep 2025 22:50:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/What-FFT-methods-should-I-use/m-p/1717303#M37339</guid>
      <dc:creator>brianreinhold</dc:creator>
      <dc:date>2025-09-16T22:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: What FFT methods should I use?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/What-FFT-methods-should-I-use/m-p/1717726#M37347</link>
      <description>&lt;P&gt;Thank you for posting in the forum!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;However, in spite of the fact all my data is real, I had to allocate a complex array to go from spectral to grid point space.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;gt; Actually you don't have to allocate a complex array. In ${MKLROOT}/include/mkl_dfti.h, the compute API is declared as "DFTI_EXTERN MKL_LONG DftiComputeForward(DFTI_DESCRIPTOR_HANDLE, void*, ...);", the arrays got passed as void pointers. So, for example, if using &lt;STRONG&gt;&lt;EM&gt;double* a&lt;/EM&gt;&lt;/STRONG&gt; to store the complex data in &lt;STRONG&gt;&lt;EM&gt;MKL_Complex16&amp;nbsp;*b&lt;/EM&gt;&lt;/STRONG&gt;, a[0] takes b[0].real, a[1] takes b[0].imag, a[2] takes b[1].real, ...&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2025 20:46:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/What-FFT-methods-should-I-use/m-p/1717726#M37347</guid>
      <dc:creator>Fengrui</dc:creator>
      <dc:date>2025-09-18T20:46:16Z</dc:date>
    </item>
  </channel>
</rss>

