Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- MKL FFT functions - compute the N-point fft?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

andreasjh

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-22-2021
06:24 AM

51 Views

MKL FFT functions - compute the N-point fft?

Hello,

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?

The problem is that i need to translate the matlab function **fft(X,N)** to use with the MKL-lib. The function inside matlab is described as : "**fft(X,N)** is the N-point fft, padded with zeros if X has less

than N points and truncated if it has more." (see ref.)*As an example,* lets say i have a:

Input vector, *I_vec*, with size of 100 (can vary from 1 to 1500) elements and a output vector, *O_vec*, with size of 2048 (can vary between the fifth closest power of 2 of input vec).

I want to compute the values on these 100 elements to "fill up" the 2048 (1D) vector.

Let's say that i have computed the values by the *DftiComputeForward*. I am then expecting the output to be:*inplace fft for I_vec:* I_vec[0] = 0.1, i_vec[1] = 0.2, ....*out of place fft for I_vec to O_vec:* O_vec[0] = 0.1 ... O_vec[~10] = 0.15 ... O_vec[~20] = 0.2.

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? If you have any tips to where to look or can give an example of how to do this, it would be highly appreciated.

Thanks in advance,

Andreas

More info of the n-point fft can be found on: https://www.dsprelated.com/showthread/comp.dsp/56353-1.php and the matlab api: https://se.mathworks.com/help/matlab/ref/fft.html#d123e392801 **Specs:**

Ubuntu 20.04 (linux)

Intel oneAPI integrated in Eclipse IDE (v. 2021.2.0)

Intel C++ compiler

Intel MKL - static lib

C-languge

Intel core i7-8750h

Link Copied

0 Replies

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.