<?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 2d FFT CCE format in C in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/2d-FFT-CCE-format-in-C/m-p/763098#M50</link>
    <description>Jozsef,&lt;BR /&gt;&lt;BR /&gt;Have you seen the 2D example code in the examples/fftc directory? &lt;BR /&gt;&lt;BR /&gt;Todd</description>
    <pubDate>Mon, 16 Aug 2010 21:43:49 GMT</pubDate>
    <dc:creator>Todd_R_Intel</dc:creator>
    <dc:date>2010-08-16T21:43:49Z</dc:date>
    <item>
      <title>2d FFT CCE format in C</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/2d-FFT-CCE-format-in-C/m-p/763097#M49</link>
      <description>I wonder how the frequencies are associated to the output matrix elements after a 2d FFT in CCE format in C.&lt;BR /&gt;&lt;BR /&gt;As I understand, for a real-to-complex FFT, I get the output as an array of y&lt;M&gt;[N/2+1] complex numbers. Now, there is a conjugate-even symmetry in both dimensions. Accordingly, in C, only N/2+1 elements are stored in the N direction. My question is: how should the symmetry be understood in the M direction or in other words, how are the positive and negative frequencies are associated to the complex coefficients in the output array y?&lt;BR /&gt;&lt;BR /&gt;An example might make it more clear. In 1D, the loop&lt;BR /&gt;&lt;BR /&gt;int k;&lt;BR /&gt;double Y = 0.0;&lt;BR /&gt;&lt;BR /&gt;for ( k = -N/2; k &amp;lt; N/2+N%2; k++ )&lt;BR /&gt; Y += y[abs(k)*2+0]*cos(2.0*PI*j/n*k) - SGN(k)*y[abs(k)*2+1]*sin(2.0*PI*j/n*k);&lt;BR /&gt;&lt;BR /&gt;seems to correctly sum up in Y the approximate Fourier series, evaluated at 2.0*PI*j/n ,using the complex coefficients (stored in y in CCS format) after a 1D FFT.&lt;BR /&gt;&lt;BR /&gt;The question is how can one construct a similar loop in 2D?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jozsef&lt;BR /&gt;&lt;/M&gt;</description>
      <pubDate>Fri, 13 Aug 2010 17:17:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/2d-FFT-CCE-format-in-C/m-p/763097#M49</guid>
      <dc:creator>Jozsef</dc:creator>
      <dc:date>2010-08-13T17:17:45Z</dc:date>
    </item>
    <item>
      <title>2d FFT CCE format in C</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/2d-FFT-CCE-format-in-C/m-p/763098#M50</link>
      <description>Jozsef,&lt;BR /&gt;&lt;BR /&gt;Have you seen the 2D example code in the examples/fftc directory? &lt;BR /&gt;&lt;BR /&gt;Todd</description>
      <pubDate>Mon, 16 Aug 2010 21:43:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/2d-FFT-CCE-format-in-C/m-p/763098#M50</guid>
      <dc:creator>Todd_R_Intel</dc:creator>
      <dc:date>2010-08-16T21:43:49Z</dc:date>
    </item>
    <item>
      <title>2d FFT CCE format in C</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/2d-FFT-CCE-format-in-C/m-p/763099#M51</link>
      <description>Hi Todd,&lt;BR /&gt;&lt;BR /&gt;yes, I have looked at them. (The examples/dftc folder.) They do forward and backward transform. I don't see how this is helpful in how the data should be interpreted.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jozsef</description>
      <pubDate>Mon, 16 Aug 2010 22:09:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/2d-FFT-CCE-format-in-C/m-p/763099#M51</guid>
      <dc:creator>Jozsef</dc:creator>
      <dc:date>2010-08-16T22:09:32Z</dc:date>
    </item>
    <item>
      <title>2d FFT CCE format in C</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/2d-FFT-CCE-format-in-C/m-p/763100#M52</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;In order to help you it needs to specify your function.&lt;BR /&gt;Currently, I have just a guess that you want after forward DFT-transform to restore all data manually doing backward transform. Am I right?&lt;BR /&gt;Before you implemented such function for 1D CCE. Maybe to simplify your task let us try to implement such function for 2D complex-to-complex transform first. And after that just correct it for 2D CCE.</description>
      <pubDate>Tue, 17 Aug 2010 06:36:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/2d-FFT-CCE-format-in-C/m-p/763100#M52</guid>
      <dc:creator>barragan_villanueva_</dc:creator>
      <dc:date>2010-08-17T06:36:34Z</dc:date>
    </item>
    <item>
      <title>2d FFT CCE format in C</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/2d-FFT-CCE-format-in-C/m-p/763101#M53</link>
      <description>&lt;P&gt;Hi Jozsef,&lt;/P&gt;&lt;P&gt;Multidimensional real transform N1-by-N2-by-N3-... produces conjugate-even sequence y with the following symmetry property (MKL Reference Manual, subsection Forward domain of transform):&lt;/P&gt;&lt;P&gt;y(n1,n2,n3,...) = conj( y(N1-n1,N2-n2,N3-n3,...) ).&lt;/P&gt;&lt;P&gt;For 2D case M-by-N, we have:&lt;/P&gt;&lt;P&gt;y(m,n) = conj( y(M-m,N-n) )&lt;/P&gt;&lt;P&gt;Now, how the y(m,n) for the M-by-N transform are stored in C/C++? &lt;BR /&gt;Let us use notation y(m,n), for whichwe define:&lt;/P&gt;&lt;P&gt;#define y(m,n) y&lt;M&gt;&lt;N&gt;&lt;/N&gt;&lt;/M&gt;&lt;/P&gt;&lt;P&gt;This definition may be useful when the dimensions of the data are not known at compile time, for example:&lt;/P&gt;&lt;P&gt;complex *y = (complex*)malloc( sizeof(complex) * M * N ); //M,N are not known until run-time&lt;BR /&gt;#define y(m,n) y[(m)*N + (n)] // row-major layout&lt;/P&gt;&lt;P&gt;For the full 2d-sequence, (m,n) would run from (0,0) to (M-1,N-1). Due to symmetry property, only one half of the sequence is stored, where (m,n) run from (0,0) to (M-1,N/2). Thus if one needs y(m,k) with k &amp;gt; N/2, he should use y(m,k) = conj( y(m,N-k) ).&lt;/P&gt;&lt;P&gt;A mapping of the conjugate-even sequence to a form where frequences span from negative to positive with zero frequency in the middle employs the fact that, according to definition of DFT, &lt;BR /&gt;y(m,k) = y(M*l+m,N*k+n) for any integers k,l. Thus we may chose this mapping to full sequence y:&lt;/P&gt;&lt;P&gt;m = -(M-1)/2...M/2&lt;BR /&gt;n = -(N-1)/2...N/2&lt;BR /&gt;y_shifted(m,n) = &lt;BR /&gt; y(m,n) where 0&amp;lt;=m&amp;lt;=M/2, 0&amp;lt;=n&amp;lt;=N/2&lt;BR /&gt; y(m+M,n) where -(M-1)/2&amp;lt;=m&amp;lt;0, 0&amp;lt;=n&amp;lt;=N/2&lt;BR /&gt; y(m,n+N) where 0&amp;lt;=m&amp;lt;=M/2, -(N-1)/2&amp;lt;=n&amp;lt;0&lt;BR /&gt; y(m+M,n+N) where -(M-1)/2&amp;lt;=m&amp;lt;0, -(N-1)/2&amp;lt;=n&amp;lt;0&lt;/P&gt;&lt;P&gt;This definition doesn't suit our purpose because it addresses items with n&amp;gt;N/2, that is the half that is not stored. One can map the definition of y_shifted to the computed CCE data that spans index range (0,0)...(M-1,N/2) using the conjugate-even symmetry:&lt;/P&gt;&lt;P&gt;m = -(M-1)/2...M/2&lt;BR /&gt;n = -(N-1)/2...N/2&lt;BR /&gt;y_shifted(m,n) = &lt;BR /&gt; y(m,n) where 0&amp;lt;=m&amp;lt;=M/2, 0&amp;lt;=n&amp;lt;=N/2&lt;BR /&gt; y(m+M,n) where -(M-1)/2&amp;lt;=m&amp;lt;0, 0&amp;lt;=n&amp;lt;=N/2&lt;BR /&gt; conj( y(0,-n) ) where 0=m, -(N-1)/2&amp;lt;=n&amp;lt;0&lt;BR /&gt; conj( y(M-m,-n) ) where 0&lt;M&gt;&amp;lt;=M/2, -(N-1)/2&amp;lt;=n&amp;lt;0&lt;BR /&gt; conj( y(-m,-n) ) where -(M-1)/2&amp;lt;=m&amp;lt;0, -(N-1)/2&amp;lt;=n&amp;lt;0&lt;/M&gt;&lt;/P&gt;&lt;P&gt;I hope this will help you.&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;Dima&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2010 08:52:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/2d-FFT-CCE-format-in-C/m-p/763101#M53</guid>
      <dc:creator>Dmitry_B_Intel</dc:creator>
      <dc:date>2010-08-17T08:52:50Z</dc:date>
    </item>
    <item>
      <title>2d FFT CCE format in C</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/2d-FFT-CCE-format-in-C/m-p/763102#M54</link>
      <description>Hi Dima,&lt;BR /&gt;&lt;BR /&gt;that's exactly what I was interested in. Works perfect.&lt;BR /&gt;&lt;BR /&gt;Thanks a bunch,&lt;BR /&gt;Jozsef</description>
      <pubDate>Tue, 17 Aug 2010 18:31:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/2d-FFT-CCE-format-in-C/m-p/763102#M54</guid>
      <dc:creator>Jozsef</dc:creator>
      <dc:date>2010-08-17T18:31:00Z</dc:date>
    </item>
  </channel>
</rss>

