<?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 inverse fft with real result in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/inverse-fft-with-real-result/m-p/1006730#M23218</link>
    <description>&lt;P&gt;Let me know if you've heard this before!&lt;/P&gt;

&lt;P&gt;I am trying to write an ipps-based function that does something like following MatLab code:&lt;/P&gt;

&lt;P&gt;result = ifft( theFT.*conj(theFT) );&lt;/P&gt;

&lt;P&gt;Here, theFT is a complex vector and multiplying by its conjugate yields the squared magnitude, which is real. We then get the inverse real fft.&lt;/P&gt;

&lt;P&gt;My questions are about formatting the data efficiently for IPP. If I call MagSquared, that gives me a real vector, but I need something in perm (or pack or ccs) format to pass to ippsFFTInv. Is there a convenient function for converting from real to perm? If not, should I write my own function to compute the magnitude and store it in perm format?&lt;/P&gt;

&lt;P&gt;thanks for your attention&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 03 May 2014 00:19:43 GMT</pubDate>
    <dc:creator>mjc</dc:creator>
    <dc:date>2014-05-03T00:19:43Z</dc:date>
    <item>
      <title>inverse fft with real result</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/inverse-fft-with-real-result/m-p/1006730#M23218</link>
      <description>&lt;P&gt;Let me know if you've heard this before!&lt;/P&gt;

&lt;P&gt;I am trying to write an ipps-based function that does something like following MatLab code:&lt;/P&gt;

&lt;P&gt;result = ifft( theFT.*conj(theFT) );&lt;/P&gt;

&lt;P&gt;Here, theFT is a complex vector and multiplying by its conjugate yields the squared magnitude, which is real. We then get the inverse real fft.&lt;/P&gt;

&lt;P&gt;My questions are about formatting the data efficiently for IPP. If I call MagSquared, that gives me a real vector, but I need something in perm (or pack or ccs) format to pass to ippsFFTInv. Is there a convenient function for converting from real to perm? If not, should I write my own function to compute the magnitude and store it in perm format?&lt;/P&gt;

&lt;P&gt;thanks for your attention&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 May 2014 00:19:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/inverse-fft-with-real-result/m-p/1006730#M23218</guid>
      <dc:creator>mjc</dc:creator>
      <dc:date>2014-05-03T00:19:43Z</dc:date>
    </item>
    <item>
      <title>Hi Mjc,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/inverse-fft-with-real-result/m-p/1006731#M23219</link>
      <description>&lt;P&gt;Hi Mjc,&lt;/P&gt;

&lt;P&gt;all packed formats (Pack, Perm, Ccs) are intended for storing complex data. Your vector is real - so the easiest way is to convert it to complex (for example using ippsSampleUp) and then apply complex iFFT instead of developing your own function for RealToPerm conversion.&lt;/P&gt;

&lt;P&gt;regards, Igor&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2014 07:46:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/inverse-fft-with-real-result/m-p/1006731#M23219</guid>
      <dc:creator>Igor_A_Intel</dc:creator>
      <dc:date>2014-05-14T07:46:17Z</dc:date>
    </item>
    <item>
      <title>That would not be efficient,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/inverse-fft-with-real-result/m-p/1006732#M23220</link>
      <description>&lt;P&gt;That would not be efficient, requiring twice the amount of computation. I have determined that a simple hand-written routine is best.&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2014 17:43:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/inverse-fft-with-real-result/m-p/1006732#M23220</guid>
      <dc:creator>mjc</dc:creator>
      <dc:date>2014-05-14T17:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: That would not be efficient,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/inverse-fft-with-real-result/m-p/1633548#M28844</link>
      <description>&lt;P&gt;Hi, do you mind sharing your implementation?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 05:54:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/inverse-fft-with-real-result/m-p/1633548#M28844</guid>
      <dc:creator>kcang2</dc:creator>
      <dc:date>2024-09-26T05:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Hi Mjc,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/inverse-fft-with-real-result/m-p/1633557#M28845</link>
      <description>&lt;P&gt;How does&amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;ippsSampleUp&lt;/EM&gt; help? AFAIK it only changes a real signal to another real signal, or a complex signal to another complex signal. Don't think it does real -&amp;gt; complex.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For my case, I have a filter in Fourier/frequency domain (this is a strict requirement), e.g. a ramp filter.&lt;BR /&gt;I want to apply this filter onto an image row using&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;ippsMulPerm_32f.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In order to do that, I will have to&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;ippsFFTFwd_RToPerm_32f the image row,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;ippsMulPerm_32f the previous with the filter, and then&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ippsFFTInv_PermToR_32f to get the filtered result.&lt;BR /&gt;&lt;BR /&gt;I can't figure out how to change the filter kernel from non-Perm to Perm format.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;Here's what I did which is basically re-arranging the values and splitting the magnitude of the component equally into real and imaginary.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;    std::vector&amp;lt;float&amp;gt; kernelToPerm(const std::vector&amp;lt;float&amp;gt;&amp;amp; kernel)
    {
        size_t n = kernel.size();
        std::vector&amp;lt;float&amp;gt; res(n);

        // Purely real frequencies
        res[0] = kernel[0];
        res[1] = kernel[n / 2];

        for (int i = 2; i &amp;lt; res.size(); i += 2)
        {
            float energy = kernel[i / 2] * inv_sqrt2;
            res[i] = res[i + 1] = energy;
        }

        return res;
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However, the result is always different than if I use a time-domain filter and forward FFT that filter before multiplying.&lt;BR /&gt;The reason I can't use a time-domain filter is a project requirement, where the filter may have additional smoothing performed in Fourier Domain.&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Sep 2024 07:01:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/inverse-fft-with-real-result/m-p/1633557#M28845</guid>
      <dc:creator>kcang2</dc:creator>
      <dc:date>2024-09-26T07:01:14Z</dc:date>
    </item>
  </channel>
</rss>

