Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Problem with DftiComputeForward call

tdot
Beginner
552 Views

Using an input data set of std::complex<double> sig2[3]={{0.6,0.5},{0.4,0.3},{0, 0.1}};

The call to status = DftiComputeForward(my_desc1_handle, sig2) results in

sig2 = {{2969.6, 2.046384154832482e-13i}, {2.0463846969335625e-13 , 0.3}, {0, 0.1}}.

 

A call to Matlab fft(sig2) results in sig2 = {{1.2, 0.9},{0.4732,  0.1268}, { 0.1268,  0.4732}}

The two don't agree and I place more confidence in the Matlab result at this point.  The code I am using is copied from the example provided by the library documentation.  Below is that code.

DFTI_DESCRIPTOR_HANDLE my_desc1_handle = nullptr;
MKL_LONG status;
std::complex<double> sig2[3]={{0.6,0.5},{0.4,0.3},{0, 0.1}};
status = DftiCreateDescriptor(&my_desc1_handle, DFTI_SINGLE, DFTI_COMPLEX, 1, 3);

status = DftiCommitDescriptor(my_desc1_handle);
status = DftiComputeForward(my_desc1_handle, sig2);

 

Note all status result l have been check for each step, I ahve not included them.  Using debug stepping I have verified that status has been 0 for each call.

 

device info: [Intel(R) Corporation Intel(R) Xeon(R) Gold 5218R CPU @ 2.10GHz Version: 3.0]

Running on Linux5.4.17 x86_64

Mkl installed version is 2023.0.0

 

 

0 Kudos
0 Replies
Reply