<?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 Please check https://software in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-mkl-for-FFT/m-p/1078267#M22672</link>
    <description>&lt;P&gt;Please check&amp;nbsp;https://software.intel.com/en-us/node/521971 to view how FFT results are stored.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Apr 2017 00:54:22 GMT</pubDate>
    <dc:creator>Jing_Xu</dc:creator>
    <dc:date>2017-04-10T00:54:22Z</dc:date>
    <item>
      <title>How to use mkl for FFT？</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-mkl-for-FFT/m-p/1078266#M22671</link>
      <description>&lt;P&gt;I am a new student in mkl and c language.&lt;/P&gt;

&lt;P&gt;now when i replace&amp;nbsp;FFT&amp;nbsp;function&amp;nbsp;with DftiComputeForward， i can not get the correct out put，why？&lt;/P&gt;

&lt;P&gt;Realft(info.x,info.fftN);&amp;nbsp;&amp;nbsp;// FFT info.x is&amp;nbsp; float in-out x[1] is real ,x[2] is complex.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; MKL_Complex8* x_cmplx = 0;&lt;BR /&gt;
	&amp;nbsp;x_cmplx = (MKL_Complex8*)mkl_malloc((info.fftN/2 + 1) * sizeof(MKL_Complex8), 64);&lt;BR /&gt;
	&amp;nbsp;DftiComputeForward(hand, info.x,x_cmplx);&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2017 07:58:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-mkl-for-FFT/m-p/1078266#M22671</guid>
      <dc:creator>薛_清_</dc:creator>
      <dc:date>2017-04-09T07:58:18Z</dc:date>
    </item>
    <item>
      <title>Please check https://software</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-mkl-for-FFT/m-p/1078267#M22672</link>
      <description>&lt;P&gt;Please check&amp;nbsp;https://software.intel.com/en-us/node/521971 to view how FFT results are stored.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 00:54:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-mkl-for-FFT/m-p/1078267#M22672</guid>
      <dc:creator>Jing_Xu</dc:creator>
      <dc:date>2017-04-10T00:54:22Z</dc:date>
    </item>
    <item>
      <title>Quote:Jing X. (Intel) wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-mkl-for-FFT/m-p/1078268#M22673</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Jing X. (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Please check&amp;nbsp;&lt;A href="https://software.intel.com/en-us/node/521971"&gt;https://software.intel.com/en-us/node/521971&lt;/A&gt; to view how FFT results are stored.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P style="box-sizing: border-box; margin-bottom: 1.06667em; line-height: 1.4; max-width: none; color: rgb(85, 85, 85); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;Hi ,Jing X&lt;/P&gt;

&lt;P style="box-sizing: border-box; margin-bottom: 1.06667em; line-height: 1.4; max-width: none; color: rgb(85, 85, 85); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Thanks for your help. I have read the instructions you show me，but still have some questions&lt;/P&gt;

&lt;P style="box-sizing: border-box; margin-bottom: 1.06667em; line-height: 1.4; max-width: none; color: rgb(85, 85, 85); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;status = DftiSetValue(hand, DFTI_INPUT_STRIDES, &amp;lt;real_strides&amp;gt;);&lt;BR style="box-sizing: border-box;" /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;status = DftiSetValue(hand, DFTI_OUTPUT_STRIDES, &amp;lt;complex_strides&amp;gt;);&lt;/P&gt;

&lt;P style="box-sizing: border-box; margin-bottom: 1.06667em; line-height: 1.4; max-width: none; color: rgb(85, 85, 85); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;How can i fill the&amp;nbsp;&lt;SPAN style="box-sizing: border-box;"&gt;&amp;nbsp;&amp;lt;real_strides&amp;gt; and&amp;nbsp;&amp;lt;complex_strides&amp;gt;？&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 18:30:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-mkl-for-FFT/m-p/1078268#M22673</guid>
      <dc:creator>薛_清_</dc:creator>
      <dc:date>2017-04-10T18:30:20Z</dc:date>
    </item>
    <item>
      <title>Please check https://software</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-mkl-for-FFT/m-p/1078269#M22674</link>
      <description>&lt;P&gt;Please check&amp;nbsp;https://software.intel.com/en-us/node/521967 for information about strides.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 01:16:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-mkl-for-FFT/m-p/1078269#M22674</guid>
      <dc:creator>Jing_Xu</dc:creator>
      <dc:date>2017-04-11T01:16:45Z</dc:date>
    </item>
    <item>
      <title>Quote:Jing X. (Intel) wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-mkl-for-FFT/m-p/1078270#M22675</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Jing X. (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Please check&amp;nbsp;&lt;A href="https://software.intel.com/en-us/node/521967"&gt;https://software.intel.com/en-us/node/521967&lt;/A&gt; for information about strides.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt; thanks for your help,i have learnt a lot.&lt;P&gt;&lt;/P&gt;

&lt;P&gt;now I want to konw that&lt;/P&gt;

&lt;P&gt;how to&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;get the power conveniently&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;，like ek=Σ real*real+imag*imag&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 06:48:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-mkl-for-FFT/m-p/1078270#M22675</guid>
      <dc:creator>薛_清_</dc:creator>
      <dc:date>2017-04-17T06:48:44Z</dc:date>
    </item>
    <item>
      <title>I don't think there is a</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-mkl-for-FFT/m-p/1078271#M22676</link>
      <description>&lt;P&gt;I don't think there is a direct MKL API function that works on this task.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 06:27:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-mkl-for-FFT/m-p/1078271#M22676</guid>
      <dc:creator>Jing_Xu</dc:creator>
      <dc:date>2017-04-19T06:27:54Z</dc:date>
    </item>
    <item>
      <title>Quote:Jing X. (Intel) wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-mkl-for-FFT/m-p/1078272#M22677</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Jing X. (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;I don't think there is a direct MKL API function that works on this task.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;thank you ，and if I want to use fft function for many times ， &amp;nbsp;how can it take less time？&lt;/P&gt;

&lt;P&gt;what must be&amp;nbsp;&lt;SPAN style="color: rgb(43, 43, 43); font-family: arial, sans-serif; font-size: 14px; line-height: 21px; background-color: rgb(248, 248, 248);"&gt;repeat for every time when sue fft function &amp;nbsp;？&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;status = DftiCreateDescriptor(&amp;amp;hand, DFTI_SINGLE, DFTI_REAL,1, (long int)info.fftN);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; status = DftiSetValue(hand, DFTI_PLACEMENT, DFTI_NOT_INPLACE);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; status = DftiSetValue(hand, DFTI_CONJUGATE_EVEN_STORAGE,&amp;nbsp;DFTI_COMPLEX_COMPLEX);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; status = DftiCommitDescriptor(hand);&lt;/P&gt;

&lt;P&gt;To be honest，when i use mkl fft function ，my &amp;nbsp;&lt;SPAN style="color: rgb(43, 43, 43); font-family: arial, sans-serif; font-size: 14px; line-height: 21px; background-color: rgb(248, 248, 248);"&gt;running time of the program gets longer. I really want to know why &amp;nbsp; thank you.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;void FFT(float* s, int frSize, int invert)&lt;BR /&gt;
	{&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;int ii,jj,n,nn,limit,m,j,inc,i;&lt;BR /&gt;
	&amp;nbsp; float wx,wr,wpr,wpi,wi,theta;&lt;BR /&gt;
	&amp;nbsp; float xre,xri,x;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;//n=VectorSize(s);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;n=frSize;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;nn=n / 2; j = 1;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;for (ii=1;ii&amp;lt;=nn;ii++) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; i = 2 * ii - 1;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; if (j&amp;gt;i) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xre = s&lt;J&gt;; xri = s[j + 1];&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s&lt;J&gt; = s&lt;I&gt;; &amp;nbsp;s[j + 1] = s[i + 1];&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s&lt;I&gt; = xre; s[i + 1] = xri;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; m = n / 2;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; while (m &amp;gt;= 2 &amp;nbsp;&amp;amp;&amp;amp; j &amp;gt; m) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;j -= m; m /= 2;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; j += m;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;};&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;limit = 2;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;while (limit &amp;lt; n) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; inc = 2 * limit; theta = TPI / limit;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; if (invert) theta = -theta;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; x = sin(0.5 * theta);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; wpr = -2.0 * x * x; wpi = sin(theta);&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; wr = 1.0; wi = 0.0;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; for (ii=1; ii&amp;lt;=limit/2; ii++) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;m = 2 * ii - 1;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (jj = 0; jj&amp;lt;=(n - m) / inc;jj++) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i = m + jj * inc;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; j = i + limit;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xre = wr * s&lt;J&gt; - wi * s[j + 1];&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xri = wr * s[j + 1] + wi * s&lt;J&gt;;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s&lt;J&gt; = s&lt;I&gt; - xre; s[j + 1] = s[i + 1] - xri;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s&lt;I&gt; = s&lt;I&gt; + xre; s[i + 1] = s[i + 1] + xri;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;wx = wr;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;wr = wr * wpr - wi * wpi + wr;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;wi = wi * wpr + wx * wpi + wi;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; limit = inc;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;if (invert)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; for (i = 1;i&amp;lt;=n;i++)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s&lt;I&gt; = s&lt;I&gt; / nn; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	}&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/J&gt;&lt;/J&gt;&lt;/J&gt;&lt;/I&gt;&lt;/I&gt;&lt;/J&gt;&lt;/J&gt;&lt;/P&gt;

&lt;P&gt;/* EXPORT-&amp;gt; Realft: apply fft to real s */&lt;/P&gt;

&lt;P&gt;void Realft (float* s,int fftSize)&lt;BR /&gt;
	{&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp;int n, n2, i, i1, i2, i3, i4;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;float xr1, xi1, xr2, xi2, wrs, wis;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;float yr, yi, yr2, yi2, yr0, theta, x;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp;//n=VectorSize(s) / 2;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;n=fftSize / 2;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;n2 = n/2;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;theta = PI / n;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;FFT(s, fftSize, FALSE);//&amp;nbsp;&amp;nbsp; &amp;nbsp;3.27.22.35 XQW-MKL&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;x = sin(0.5 * theta);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;yr2 = -2.0 * x * x;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;yi2 = sin(theta); yr = 1.0 + yr2; yi = yi2;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;for (i=2; i&amp;lt;=n2; i++) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; i1 = i + i - 1; &amp;nbsp; &amp;nbsp; &amp;nbsp;i2 = i1 + 1;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; i3 = n + n + 3 - i2; i4 = i3 + 1;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; wrs = yr; wis = yi;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; xr1 = (s[i1] + s[i3])/2.0; xi1 = (s[i2] - s[i4])/2.0;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; xr2 = (s[i2] + s[i4])/2.0; xi2 = (s[i3] - s[i1])/2.0;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; s[i1] = xr1 + wrs * xr2 - wis * xi2;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; s[i2] = xi1 + wrs * xi2 + wis * xr2;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; s[i3] = xr1 - wrs * xr2 + wis * xi2;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; s[i4] = -xi1 + wrs * xi2 + wis * xr2;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; yr0 = yr;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; yr = yr * yr2 - yi &amp;nbsp;* yi2 + yr;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; yi = yi * yr2 + yr0 * yi2 + yi;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;xr1 = s[1];&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;s[1] = xr1 + s[2];&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;s[2] = 0.0;&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 09:14:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-mkl-for-FFT/m-p/1078272#M22677</guid>
      <dc:creator>薛_清_</dc:creator>
      <dc:date>2017-04-24T09:14:31Z</dc:date>
    </item>
  </channel>
</rss>

