Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6677 Discussions

Single-to-complex DFT using two double arrays for output

sudoLife
New Contributor I
447 Views

Hi,

 

The following scenario:

Input: a signal stored as vector.

Required output: range vector and phase vector.

 

How do I set this kind of output (to two different arrays)? I only saw people output to MKL_Complex16 a.k.a std::complex<double>  and the documentation was a bit beyond me.

 

Thanks!

0 Kudos
6 Replies
ShanmukhS_Intel
Moderator
419 Views

Hi,


Thanks for posting on Intel Communities. Please refer the below link which illustrates the use of DFTI_COMPLEX_COMPLEX and DFTI_REAL_REAL if this could help you.


https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/fouri...


Best Regards,

Shanmukh.SS


sudoLife
New Contributor I
406 Views

Hi,

 

Thanks for the reply, Shanmukh. I have looked through that documentation.

Here's my descriptor:

status = DftiCreateDescriptor(&descriptor, DFTI_SINGLE, DFTI_REAL, 1, 1024); //Specify size and precision
status = DftiSetValue(descriptor, DFTI_PLACEMENT, DFTI_NOT_INPLACE);
status = DftiCommitDescriptor(descriptor);

So the input is a double array.

With DFTI_REAL_REAL, I only found an example of inplace DFT. Does that mean that if I want an out-of-place DFT, and I have REAL input, I  can specify two double arrays for output? Because that's what I'm trying to do.

 

I appreciate your input.

 

ShanmukhS_Intel
Moderator
359 Views

Hi,


We are working on your issue description. We will get back to you soon with an update.


Best Regards,

Shanmukh.SS



Khang_N_Intel
Employee
351 Views

Hi,


I will provide you with feedback on your issue soon.


Best regards,

Khang


Khang_N_Intel
Employee
346 Views

Hi,


oneMKL FFT does not support complex results as amplitude-phase directly.

Please see: https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-fortran/top...


As for splitting the output, you can use the parameter DFTI_CONJUGATE_EVEN_STORAGE.

https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-fortran/top...

Please look at examples config_srtorage.c and basic_sp_real_dft_1d.c that come with the mkl package for reference.

However, the value DFTI_CONJUGATE_EVEN_STORAGE=DFTI_COMPLEX_REAL is deprecated. So, we don't recommend using this option.

I don't have other option to recommend to you.

You can request the mkl team to provide this feature in ututre version of oneMKL.


Bets regards.

Khang


Best regards,

Khang


Khang_N_Intel
Employee
300 Views

Hi,


Since the answer has been provided, there will be no more communication on this thread.

Should you have any new issues or questions, please do not hesitate to create new threads.


Best regards,

Khang


Reply