<?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 Thank you Evarist Fomenko.
  in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-in-computation-of-2D-FFT-using-two-seperate-real-and/m-p/944372#M14751</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;A href="http://software.intel.com/en-us/user/816423" style="font-family: Arial, Helvetica, sans-serif; font-size: 11.333333015441895px; line-height: 11px; background-color: rgb(238, 238, 238);"&gt;Evarist Fomenko&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Mar 2014 07:41:39 GMT</pubDate>
    <dc:creator>shiva_rama_krishna_b</dc:creator>
    <dc:date>2014-03-13T07:41:39Z</dc:date>
    <item>
      <title>problem in computation of 2D FFT using two seperate real and imaginary arrays</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-in-computation-of-2D-FFT-using-two-seperate-real-and/m-p/944370#M14749</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;i want to compute FFT of a complex 2D array. So first i have tried it in 2 ways.&lt;/P&gt;

&lt;P&gt;1) Directly using complex 2D array(real and imaginary interleaved) .&lt;/P&gt;

&lt;P&gt;2) 2 seperate arrays(where real and imaginary are deinterleaved into 2 seperate arrays).&lt;/P&gt;

&lt;P&gt;i found the output is different in both cases. can some one tell me if i do some thing wrong in the code.&lt;/P&gt;

&lt;P&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;
	#include &amp;lt;stdlib.h&amp;gt;&lt;BR /&gt;
	#include &amp;lt;math.h&amp;gt;&lt;BR /&gt;
	#include &amp;lt;float.h&amp;gt;&lt;BR /&gt;
	#include &amp;lt;complex&amp;gt;&lt;BR /&gt;
	#define MKL_Complex8 std::complex&amp;lt;float&amp;gt;&lt;BR /&gt;
	#include "mkl_dfti.h"&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	int main()&lt;BR /&gt;
	{&lt;BR /&gt;
	printf("hi\n");&lt;BR /&gt;
	int N1 = 4;&lt;BR /&gt;
	int N2 = 4;&lt;BR /&gt;
	MKL_LONG status = 0;&lt;BR /&gt;
	&amp;nbsp;MKL_Complex8 *x = 0;&lt;BR /&gt;
	float* real;&lt;BR /&gt;
	float* imag;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; DFTI_DESCRIPTOR_HANDLE hand = 0;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;DFTI_DESCRIPTOR_HANDLE hand1 =0;&lt;BR /&gt;
	MKL_LONG N[2]; N[0] = N1; N[1] = N2;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; status = DftiCreateDescriptor(&amp;amp;hand, DFTI_SINGLE, DFTI_COMPLEX, 2, N);&lt;BR /&gt;
	if (0 != status) printf("failed\n");&lt;BR /&gt;
	status = DftiSetValue( hand, DFTI_PLACEMENT, DFTI_INPLACE );&lt;BR /&gt;
	if (0 != status) printf("failed\n");&lt;BR /&gt;
	status = DftiCommitDescriptor(hand);&lt;BR /&gt;
	if (0 != status) printf("failed\n");&lt;BR /&gt;
	x = (MKL_Complex8*)malloc(N1*N2*sizeof(MKL_Complex8));&lt;BR /&gt;
	real = (float*)malloc(N1*N2*sizeof(float));&lt;BR /&gt;
	imag = (float*)malloc(N1*N2*sizeof(float));&lt;/P&gt;

&lt;P&gt;status = DftiCreateDescriptor(&amp;amp;hand1, DFTI_SINGLE, DFTI_COMPLEX, 2,N);&lt;BR /&gt;
	if (0 != status) printf("failed\n");&lt;BR /&gt;
	status = DftiSetValue(hand1, DFTI_COMPLEX_STORAGE, DFTI_REAL_REAL);&lt;BR /&gt;
	if (0 != status) printf("failed\n");&lt;BR /&gt;
	status = DftiCommitDescriptor(hand1);&lt;BR /&gt;
	if (0 != status) printf("failed\n");&lt;BR /&gt;
	for(int i = 0; i &amp;lt; N1*N2; i++)&lt;BR /&gt;
	{&lt;BR /&gt;
	x&lt;I&gt;.real() =(float) 1;&lt;BR /&gt;
	real&lt;I&gt; = 1;&lt;BR /&gt;
	imag&lt;I&gt; = 1;&lt;BR /&gt;
	x&lt;I&gt;.imag() = (float)1;&lt;BR /&gt;
	}&lt;BR /&gt;
	printf("before printng\n");&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;

&lt;P&gt;for(int i =0 ; i &amp;lt; N1*N2; i++)&lt;BR /&gt;
	{&lt;BR /&gt;
	printf(" %f %f----------%f %f\n",x&lt;I&gt;.real(),x&lt;I&gt;.imag(),real&lt;I&gt;,imag&lt;I&gt;);&lt;BR /&gt;
	}&lt;BR /&gt;
	status = DftiComputeForward(hand, x);&lt;BR /&gt;
	if (0 != status) printf("failed\n");&lt;BR /&gt;
	status = DftiComputeForward(hand,real, imag);&lt;BR /&gt;
	printf("after printng\n");&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;

&lt;P&gt;for(int i =0 ; i &amp;lt; N1*N2; i++)&lt;BR /&gt;
	{&lt;BR /&gt;
	printf(" %f %f--------%f %f\n",x&lt;I&gt;.real(),x&lt;I&gt;.imag(),real&lt;I&gt;,imag&lt;I&gt;);&lt;BR /&gt;
	}&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;

&lt;P&gt;}&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 17:46:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-in-computation-of-2D-FFT-using-two-seperate-real-and/m-p/944370#M14749</guid>
      <dc:creator>shiva_rama_krishna_b</dc:creator>
      <dc:date>2014-03-12T17:46:50Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-in-computation-of-2D-FFT-using-two-seperate-real-and/m-p/944371#M14750</link>
      <description>&lt;P&gt;Hi, looks like you made a typo in line 52:&lt;/P&gt;

&lt;P&gt;[cpp] status = DftiComputeForward(hand,real, imag); [/cpp]&lt;/P&gt;

&lt;P&gt;should be replaced with&lt;/P&gt;

&lt;P&gt;[cpp] status = DftiComputeForward(hand1,real, imag); [/cpp]&lt;/P&gt;

&lt;P&gt;Then the output is the same.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2014 03:08:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-in-computation-of-2D-FFT-using-two-seperate-real-and/m-p/944371#M14750</guid>
      <dc:creator>Evarist_F_Intel</dc:creator>
      <dc:date>2014-03-13T03:08:14Z</dc:date>
    </item>
    <item>
      <title>Thank you Evarist Fomenko.
 </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-in-computation-of-2D-FFT-using-two-seperate-real-and/m-p/944372#M14751</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;A href="http://software.intel.com/en-us/user/816423" style="font-family: Arial, Helvetica, sans-serif; font-size: 11.333333015441895px; line-height: 11px; background-color: rgb(238, 238, 238);"&gt;Evarist Fomenko&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2014 07:41:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-in-computation-of-2D-FFT-using-two-seperate-real-and/m-p/944372#M14751</guid>
      <dc:creator>shiva_rama_krishna_b</dc:creator>
      <dc:date>2014-03-13T07:41:39Z</dc:date>
    </item>
  </channel>
</rss>

