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
- Setting up a FFT 2D, defining some parameters

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

Silva__Saulo

Beginner

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

08-03-2018
02:03 PM

94 Views

Setting up a FFT 2D, defining some parameters

Good evening, all.

I have successfully used FFTW wrappers for FFT 1D but am writing the 2D portion of my program using the proper MKL interface. However, there are a few points that I am in doubt as I couldn't get enough information from the development reference or other threads.

The matrix I'm working on has 2^14 columns by 2^15 rows, or 536870912 elements. The descriptor for the forward R2C transform is as follows (omitting declaration of descriptor and error checking), following the required parameters as described in manual page 2127 of the 2018 reference:

DftiCreateDescriptor(&fwfft_2D_handle, DFTI_SINGLE, DFTI_REAL, 2, <size>); DftiSetValue(fwfft_2D_handle, DFTI_CONJUGATE_EVEN_STORAGE, DFTI_COMPLEX_COMPLEX); DftiSetValue(fwfft_2D_handle, DFTI_PACKED_FORMAT, DFTI_CCE_FORMAT); DftiSetValue(fwfft_2D_handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE); DftiSetValue(fwfft_2D_handle, DFTI_INPUT_STRIDES, <stride>); DftiSetValue(fwfft_2D_handle, DFTI_OUTPUT_STRIDES, <stride>); DftiCommitDescriptor(fwfft_2D_handle);

Notice that I left <size> and <stride> undefined here as they are the subjects of my questions below:

- If I am looping through the rows, should <size> be the number of columns of the matrix? If so, how do I provide the length of the rows?

- Is <stride> an array of MKL_LONG of the individual position of each element? If so, then the program will need 2 float arrays (input, output), 1 complex, and yet another 1 of MKL_LONG?!

If I am messing up with the understanding, I appreciate any guidance on how to setup these parameters of a 2D transform for, say, a matrix of 16384 columns by 32768 rows.

Thanks in advance.

Link Copied

2 Replies

Jonghak_K_Intel

Employee

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

08-12-2018
10:50 PM

94 Views

Hi Silva,

- <size> should be an array containing the number of the columns and rows. Please refer the example code __https://software.intel.com/en-us/mkl-developer-reference-c-2019-beta-basic_sp_real_dft_2d__

- for <stride> , please refer the example code. also.

Thank you

Silva__Saulo

Beginner

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

08-14-2018
02:06 PM

94 Views

Good evening, Jon, and thanks for your time and patience looking into this.

I actually read the code you mentioned as well as the following thread: https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/517579

The sizes are obvious to figure out, however, my confusion is in defining the input/output strides. As the definition of these in the codes don't have specific comments, then I'm not sure how to guess it. Why are these 3-elements arrays? What does each of them represent? Why the input and output strides are different? These are my main doubts on these parameters.

I'm sure it is really simple, so if you can provide an explanation on this, then I will be ready to go.

Thanks a lot.

- 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.