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

Question: cycle count of 65536 MKL FFT DftiComputeForward(C++)

____3
Beginner
485 Views

My code as followings:

 

fft_mkl(int M,float * InputData,float * OutputData)

{

MKL_LONG status;

DFTI_DESCRIPTOR my_desc1_handle;
DftiCreateDescriptor( &my_desc1_handle, DFTI_SINGLE,DFTI_COMPLEX, 1, M);
DftiSetValue( my_desc1_handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE);
DftiCommitDescriptor( my_desc1_handle );
status = DftiComputeForward( my_desc1_handle, InputData, OutputData);
status = DftiFreeDescriptor(&my_desc1_handle);

}

 

float *test = new float [65536*2];

float *test_out = new float [65536*2];

memset(test,85,4*32768);

memset(test,0,4*(65536*2-32768));

fft_mkl(65536,test,test_out);

 

Actually ,the result is wrong. It is different from fftw wrapper with 65536. But 32768 is right.Why?

MKL version:10.2.4.032

Thanks in advance!

Ziren C.

0 Kudos
3 Replies
Evgueni_P_Intel
Employee
485 Views

Hi Ziren C.

DftiCreateDescriptor takes an MKL_LONG or an array of MKL_LONG as the last argument -- please consult the reference manual https://software.intel.com/en-us/articles/intel-math-kernel-library-documentation.

Casting M to MKL_LONG should solve the problem on 64-bit systems. Please let me know, if you use a 32-bit system.

Evgueni.

 

 

0 Kudos
____3
Beginner
485 Views

Hi Evgueni,

Thanks for your answer. My system is Windows 7 64-bit.

Ziren C

0 Kudos
____3
Beginner
485 Views
Hi Evgueni, Thanks for your answer. My system is Windows 7 64-bit. Ziren C
Evgueni Petrov aka espetrov (Intel) wrote:

Hi Ziren C.

DftiCreateDescriptor takes an MKL_LONG or an array of MKL_LONG as the last argument -- please consult the reference manual https://software.intel.com/en-us/articles/intel-math-kernel-library-documentation.

Casting M to MKL_LONG should solve the problem on 64-bit systems. Please let me know, if you use a 32-bit system.

Evgueni.

 

 

0 Kudos
Reply