<?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 Re: MKL FFT functions - compute the N-point fft? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-functions-compute-the-N-point-fft/m-p/1281918#M31334</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output 2048 array will be padded with zeros after the computation is completed. You may refer to this sample.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;complex.h&amp;gt;
#include "mkl.h"
#include "mkl_dfti.h"

float _Complex c2c_input[100];
float _Complex c2c_output[2048];
DFTI_DESCRIPTOR_HANDLE my_desc_handle = NULL;
MKL_LONG status;

int main(int argc, char* argv[])
{
int i;
for(i=0;i&amp;lt;100;i++)
c2c_input[i]=i;
status = DftiCreateDescriptor(&amp;amp;my_desc_handle, DFTI_SINGLE,DFTI_COMPLEX, 1, 100);
status = DftiSetValue(my_desc_handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE);
status = DftiCommitDescriptor(my_desc_handle);
status = DftiComputeForward(my_desc_handle, c2c_input,c2c_output);
status = DftiFreeDescriptor(&amp;amp;my_desc_handle);
for(i=0;i&amp;lt;110;i++)
printf("%f\t",creal(c2c_output[i]));
return 0;
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this is not the kind of computation you were looking for, can you please elaborate more?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Rajesh.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 May 2021 11:45:53 GMT</pubDate>
    <dc:creator>MRajesh_intel</dc:creator>
    <dc:date>2021-05-17T11:45:53Z</dc:date>
    <item>
      <title>MKL FFT functions - compute the N-point fft?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-functions-compute-the-N-point-fft/m-p/1275832#M31235</link>
      <description>&lt;P&gt;Hello, &lt;BR /&gt;&lt;BR /&gt;Is there a way to compute the n-point fft of an 1D array in MKL (C-language, Linux) for an arbitrary number of n?&lt;BR /&gt;The problem is that i need to translate the matlab function &lt;STRONG&gt;fft(X,N)&lt;/STRONG&gt; to use with the MKL-lib. The function inside matlab is described as : "&lt;STRONG&gt;fft(X,N)&lt;/STRONG&gt; is the N-point fft, padded with zeros if X has less&lt;BR /&gt;than N points and truncated if it has more." (see ref.)&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;As an example,&lt;/EM&gt; lets say i have a:&lt;BR /&gt;Input vector, &lt;EM&gt;I_vec&lt;/EM&gt;, with size of 100 (can vary from 1 to 1500) elements and a output vector, &lt;EM&gt;O_vec&lt;/EM&gt;, with size of 2048 (can vary between the fifth closest power of 2 of input vec). &lt;BR /&gt;I want to compute the values on these 100 elements to "fill up" the 2048 (1D) vector. &lt;BR /&gt;Let's say that i have computed the values&amp;nbsp; by the &lt;EM&gt;DftiComputeForward&lt;/EM&gt;. I am then expecting the output to be:&lt;BR /&gt;&lt;EM&gt;inplace fft for I_vec:&lt;/EM&gt; I_vec[0] = 0.1, i_vec[1] = 0.2, ....&lt;BR /&gt;&lt;EM&gt;out of place fft for I_vec to O_vec:&lt;/EM&gt; O_vec[0] = 0.1 ... O_vec[~10] = 0.15 ... O_vec[~20] = 0.2.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Is this possible? I have tried to read the reference document and looked at the examples - but cant find anything that does this kind of computation straight away. Maybe do a number of transformations and try to pad inside the vector?&amp;nbsp; If you have any tips to where to look or can give an example of how to do this, it would be highly appreciated. &lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;Andreas&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;More info of the n-point fft can be found on: &lt;A href="https://www.dsprelated.com/showthread/comp.dsp/56353-1.php" target="_blank"&gt;https://www.dsprelated.com/showthread/comp.dsp/56353-1.php&lt;/A&gt; and the matlab api: &lt;A href="https://se.mathworks.com/help/matlab/ref/fft.html#d123e392801" target="_blank"&gt;https://se.mathworks.com/help/matlab/ref/fft.html#d123e392801&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Specs:&lt;/STRONG&gt;&lt;BR /&gt;Ubuntu 20.04 (linux)&lt;BR /&gt;Intel oneAPI integrated in Eclipse IDE (v. 2021.2.0)&lt;BR /&gt;Intel C++ compiler&lt;BR /&gt;Intel MKL - static lib&lt;BR /&gt;C-languge&lt;BR /&gt;Intel core i7-8750h&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 13:24:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-functions-compute-the-N-point-fft/m-p/1275832#M31235</guid>
      <dc:creator>andreasjh</dc:creator>
      <dc:date>2021-04-22T13:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: MKL FFT functions - compute the N-point fft?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-functions-compute-the-N-point-fft/m-p/1281918#M31334</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output 2048 array will be padded with zeros after the computation is completed. You may refer to this sample.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;complex.h&amp;gt;
#include "mkl.h"
#include "mkl_dfti.h"

float _Complex c2c_input[100];
float _Complex c2c_output[2048];
DFTI_DESCRIPTOR_HANDLE my_desc_handle = NULL;
MKL_LONG status;

int main(int argc, char* argv[])
{
int i;
for(i=0;i&amp;lt;100;i++)
c2c_input[i]=i;
status = DftiCreateDescriptor(&amp;amp;my_desc_handle, DFTI_SINGLE,DFTI_COMPLEX, 1, 100);
status = DftiSetValue(my_desc_handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE);
status = DftiCommitDescriptor(my_desc_handle);
status = DftiComputeForward(my_desc_handle, c2c_input,c2c_output);
status = DftiFreeDescriptor(&amp;amp;my_desc_handle);
for(i=0;i&amp;lt;110;i++)
printf("%f\t",creal(c2c_output[i]));
return 0;
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this is not the kind of computation you were looking for, can you please elaborate more?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Rajesh.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 11:45:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-functions-compute-the-N-point-fft/m-p/1281918#M31334</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-05-17T11:45:53Z</dc:date>
    </item>
    <item>
      <title>Re:MKL FFT functions - compute the N-point fft?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-functions-compute-the-N-point-fft/m-p/1284105#M31360</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Can you please give us any updates regarding the query?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 24 May 2021 14:36:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-functions-compute-the-N-point-fft/m-p/1284105#M31360</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-05-24T14:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: MKL FFT functions - compute the N-point fft?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-functions-compute-the-N-point-fft/m-p/1284424#M31376</link>
      <description>&lt;P&gt;Hi Rajesh,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I managed to get my wanted result working by trial and error principle but your reply was really spot on.&lt;BR /&gt;&lt;BR /&gt;The reply is more then satisfying. &lt;BR /&gt;Thanks you so much for the help, really appreciated!&lt;BR /&gt;&lt;BR /&gt;MVH,&amp;nbsp;&lt;BR /&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 08:52:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-functions-compute-the-N-point-fft/m-p/1284424#M31376</guid>
      <dc:creator>andreasjh</dc:creator>
      <dc:date>2021-05-25T08:52:24Z</dc:date>
    </item>
    <item>
      <title>Re:MKL FFT functions - compute the N-point fft?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-functions-compute-the-N-point-fft/m-p/1284428#M31377</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt; Thanks for the confirmation!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt; As this issue has been resolved, we will no longer respond to this thread. If you require any additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt; Have a Good day.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 25 May 2021 09:03:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-functions-compute-the-N-point-fft/m-p/1284428#M31377</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-05-25T09:03:31Z</dc:date>
    </item>
  </channel>
</rss>

