<?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 Problems with ippsFFTInv_CToC in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problems-with-ippsFFTInv-CToC/m-p/786998#M2081</link>
    <description>&lt;DIV id="_mcePaste"&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Hi,&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;I observe a very strange behaviour of ippsFFTInv_CToC: the results are multiplied by the FFT length even if IPP_FFT_NODIV_BY_ANY is used as a flag for FFTSpec allocation.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Below is my example code, which generates a signal, performs an FFT on it and afterwards an IFFT on the output of the FFT. I would expect the final output to be exactly the same as the generated signal (except for rounding error of course), but this is not the case: the output values need to be divided by the FFT length in order to be correct.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;As far as I could understand by reading the documentation, it doesnt seem to me that this behaviour is correct. But maybe I am making some mistake.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Any help would be greatly appreciated.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;PRE&gt;[cpp]void fftIPPTest()
{
	unsigned int nDataPow2 = 1024;
	unsigned int order = 10;

	Ipp64fc* input  = ippsMalloc_64fc(nDataPow2);
	Ipp64fc* output = ippsMalloc_64fc(nDataPow2);
	Ipp64fc* output_ifft = ippsMalloc_64fc(nDataPow2);

	ippsZero_64fc(input, nDataPow2);
	ippsZero_64fc(output, nDataPow2);
	ippsZero_64fc(output_ifft, nDataPow2);

	/*Generate some signal*/
	for (int i = 0; i &amp;lt; nDataPow2; i++)
	{
		input&lt;I&gt;.re = i;
		input&lt;I&gt;.im = i;
	}

	IppsFFTSpec_C_64fc* fftConfig;
	IppStatus st = ippsFFTInitAlloc_C_64fc(&amp;amp;fftConfig, order,
	IPP_FFT_NODIV_BY_ANY, ippAlgHintAccurate);

	/*FFT*/ 
	st = ippsFFTFwd_CToC_64fc(input, output, fftConfig, NULL);

	/*IFFT*/
	st = ippsFFTInv_CToC_64fc(output, output_ifft, fftConfig, NULL);

	for (int i = 0; i &amp;lt; nDataPow2; i++)
	{
		Ipp64f diff_re = input&lt;I&gt;.re - output_ifft&lt;I&gt;.re;
		Ipp64f diff_im = input&lt;I&gt;.im - output_ifft&lt;I&gt;.im;

		printf("-----\n");
		printf("%d re: in -&amp;gt;  %e | out -&amp;gt; %e | diff: %e\n", 
						i, input&lt;I&gt;.re, output_ifft&lt;I&gt;.re, diff_re);
		printf("%d im: in -&amp;gt;  %e | out -&amp;gt; %e | diff: %e\n", 
						i, input&lt;I&gt;.im, output_ifft&lt;I&gt;.im, diff_im);
		printf("-----\n");
	}

	st = ippsFFTFree_C_64fc(fftConfig);
	ippsFree(input);
	ippsFree(output);
	ippsFree(output_ifft);

}[/cpp]&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt; &lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 07 Mar 2011 15:39:48 GMT</pubDate>
    <dc:creator>c__a</dc:creator>
    <dc:date>2011-03-07T15:39:48Z</dc:date>
    <item>
      <title>Problems with ippsFFTInv_CToC</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problems-with-ippsFFTInv-CToC/m-p/786998#M2081</link>
      <description>&lt;DIV id="_mcePaste"&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Hi,&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;I observe a very strange behaviour of ippsFFTInv_CToC: the results are multiplied by the FFT length even if IPP_FFT_NODIV_BY_ANY is used as a flag for FFTSpec allocation.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Below is my example code, which generates a signal, performs an FFT on it and afterwards an IFFT on the output of the FFT. I would expect the final output to be exactly the same as the generated signal (except for rounding error of course), but this is not the case: the output values need to be divided by the FFT length in order to be correct.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;As far as I could understand by reading the documentation, it doesnt seem to me that this behaviour is correct. But maybe I am making some mistake.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Any help would be greatly appreciated.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;PRE&gt;[cpp]void fftIPPTest()
{
	unsigned int nDataPow2 = 1024;
	unsigned int order = 10;

	Ipp64fc* input  = ippsMalloc_64fc(nDataPow2);
	Ipp64fc* output = ippsMalloc_64fc(nDataPow2);
	Ipp64fc* output_ifft = ippsMalloc_64fc(nDataPow2);

	ippsZero_64fc(input, nDataPow2);
	ippsZero_64fc(output, nDataPow2);
	ippsZero_64fc(output_ifft, nDataPow2);

	/*Generate some signal*/
	for (int i = 0; i &amp;lt; nDataPow2; i++)
	{
		input&lt;I&gt;.re = i;
		input&lt;I&gt;.im = i;
	}

	IppsFFTSpec_C_64fc* fftConfig;
	IppStatus st = ippsFFTInitAlloc_C_64fc(&amp;amp;fftConfig, order,
	IPP_FFT_NODIV_BY_ANY, ippAlgHintAccurate);

	/*FFT*/ 
	st = ippsFFTFwd_CToC_64fc(input, output, fftConfig, NULL);

	/*IFFT*/
	st = ippsFFTInv_CToC_64fc(output, output_ifft, fftConfig, NULL);

	for (int i = 0; i &amp;lt; nDataPow2; i++)
	{
		Ipp64f diff_re = input&lt;I&gt;.re - output_ifft&lt;I&gt;.re;
		Ipp64f diff_im = input&lt;I&gt;.im - output_ifft&lt;I&gt;.im;

		printf("-----\n");
		printf("%d re: in -&amp;gt;  %e | out -&amp;gt; %e | diff: %e\n", 
						i, input&lt;I&gt;.re, output_ifft&lt;I&gt;.re, diff_re);
		printf("%d im: in -&amp;gt;  %e | out -&amp;gt; %e | diff: %e\n", 
						i, input&lt;I&gt;.im, output_ifft&lt;I&gt;.im, diff_im);
		printf("-----\n");
	}

	st = ippsFFTFree_C_64fc(fftConfig);
	ippsFree(input);
	ippsFree(output);
	ippsFree(output_ifft);

}[/cpp]&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt; &lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Mar 2011 15:39:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problems-with-ippsFFTInv-CToC/m-p/786998#M2081</guid>
      <dc:creator>c__a</dc:creator>
      <dc:date>2011-03-07T15:39:48Z</dc:date>
    </item>
    <item>
      <title>Problems with ippsFFTInv_CToC</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problems-with-ippsFFTInv-CToC/m-p/786999#M2082</link>
      <description>&lt;P&gt;Hi AC, &lt;/P&gt;&lt;P&gt;According to FFT formula, either forward transform is done with the 1/N normalization, or inverse transform is done&lt;/P&gt;&lt;P&gt;With the 1/N normalization, or forward and inverse transform is done with the N^1/2 normalization, the input and out will get same result. &lt;/P&gt;&lt;P&gt;so, it needs to use one of the following flags: &lt;/P&gt;&lt;P&gt;IPP_FFT_DIV_FWD_BY_N/IPP_FFT_DIV_INV_BY_N/IPP_FFT_DIV_BY_SQRTN. &lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Chao&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2011 06:17:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problems-with-ippsFFTInv-CToC/m-p/786999#M2082</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2011-03-09T06:17:27Z</dc:date>
    </item>
    <item>
      <title>Problems with ippsFFTInv_CToC</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problems-with-ippsFFTInv-CToC/m-p/787000#M2083</link>
      <description>&lt;DIV&gt;Ok, I got it now.&lt;/DIV&gt;&lt;DIV&gt;Thanks.&lt;/DIV&gt;</description>
      <pubDate>Wed, 09 Mar 2011 19:29:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problems-with-ippsFFTInv-CToC/m-p/787000#M2083</guid>
      <dc:creator>c__a</dc:creator>
      <dc:date>2011-03-09T19:29:43Z</dc:date>
    </item>
  </channel>
</rss>

