<?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 Hi, in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-get-wrong-Backward-DFT-answer-and-can-not-find-the-problem/m-p/1065701#M21907</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Please set type of dim as MKL_LONG, otherwise you could not create descriptor successfully. Thank you.&lt;/P&gt;

&lt;P&gt;MKL_LONG dim[2];&lt;/P&gt;

&lt;P&gt;Best regrads,&lt;BR /&gt;
	Fiona&lt;/P&gt;</description>
    <pubDate>Wed, 07 Sep 2016 02:21:32 GMT</pubDate>
    <dc:creator>Zhen_Z_Intel</dc:creator>
    <dc:date>2016-09-07T02:21:32Z</dc:date>
    <item>
      <title>I get wrong Backward DFT answer and can not find the problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-get-wrong-Backward-DFT-answer-and-can-not-find-the-problem/m-p/1065700#M21906</link>
      <description>&lt;P&gt;Hi ,I use the MKL DFT recently ,and use the forward DFT including one&amp;nbsp;dimension and two dimensions without problem.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;However, when I use the backward DFT, the result is zero !&lt;/P&gt;

&lt;P&gt;I also study the examples in /opt/intel/mkl/examples/dft and the following is my test short code ,the result in my computer is zero.&lt;/P&gt;

&lt;P&gt;I really can not find the problem in these short code and really need your help&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;math.h&amp;gt;
#include &amp;lt;float.h&amp;gt;
#include "mkl_service.h"
#include "mkl_dfti.h"
#include "mkl.h"
#include&amp;lt;sys/time.h&amp;gt;

#define ALIGN_SIZE 64
#define REP_TIMES 1

int main()
{

	
   #pragma offload target(mic:0) 
	{
		MKL_LONG status = 0;
		int dim[2];
		dim[0]=20;dim[1]=20;
		DFTI_DESCRIPTOR_HANDLE handle = 0;
	
		MKL_Complex8 *in=(MKL_Complex8*)mkl_malloc(dim[0]*dim[1]*sizeof(MKL_Complex8),ALIGN_SIZE);
		MKL_Complex8 *out=(MKL_Complex8*)mkl_malloc(dim[0]*dim[1]*sizeof(MKL_Complex8),ALIGN_SIZE);
		for(int i=0;i&amp;lt;dim[0]*dim[1];i++)
		{
			in&lt;I&gt;.real=i%100;
			in&lt;I&gt;.imag=0;
		}
		status = DftiCreateDescriptor(&amp;amp;handle, DFTI_SINGLE, DFTI_COMPLEX, 2, dim);

		status =DftiSetValue( handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE);

		status = DftiCommitDescriptor(handle);
	
		DftiComputeBackward(handle,in, out);
		for(int i=0;i&amp;lt;10;i++)
		{
			printf("%f %f\n",out&lt;I&gt;.real,out&lt;I&gt;.imag);
		}

	}
}&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;And the output &amp;nbsp;is :&lt;/P&gt;

&lt;P&gt;0.000000 0.000000&lt;BR /&gt;
	0.000000 0.000000&lt;BR /&gt;
	0.000000 0.000000&lt;BR /&gt;
	0.000000 0.000000&lt;BR /&gt;
	0.000000 0.000000&lt;BR /&gt;
	0.000000 0.000000&lt;BR /&gt;
	0.000000 0.000000&lt;BR /&gt;
	0.000000 0.000000&lt;BR /&gt;
	0.000000 0.000000&lt;BR /&gt;
	0.000000 0.000000&lt;/P&gt;

&lt;P&gt;Best Regards !&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 08:44:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-get-wrong-Backward-DFT-answer-and-can-not-find-the-problem/m-p/1065700#M21906</guid>
      <dc:creator>王_子_</dc:creator>
      <dc:date>2016-09-06T08:44:49Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-get-wrong-Backward-DFT-answer-and-can-not-find-the-problem/m-p/1065701#M21907</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Please set type of dim as MKL_LONG, otherwise you could not create descriptor successfully. Thank you.&lt;/P&gt;

&lt;P&gt;MKL_LONG dim[2];&lt;/P&gt;

&lt;P&gt;Best regrads,&lt;BR /&gt;
	Fiona&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 02:21:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-get-wrong-Backward-DFT-answer-and-can-not-find-the-problem/m-p/1065701#M21907</guid>
      <dc:creator>Zhen_Z_Intel</dc:creator>
      <dc:date>2016-09-07T02:21:32Z</dc:date>
    </item>
    <item>
      <title>Thank you very much! You are</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-get-wrong-Backward-DFT-answer-and-can-not-find-the-problem/m-p/1065702#M21908</link>
      <description>&lt;P&gt;Thank you very much! You are right.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Best regards !&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 03:09:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-get-wrong-Backward-DFT-answer-and-can-not-find-the-problem/m-p/1065702#M21908</guid>
      <dc:creator>王_子_</dc:creator>
      <dc:date>2016-09-07T03:09:27Z</dc:date>
    </item>
  </channel>
</rss>

