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

2D Complex FFT fails to put result in Output array

jmorgie
Beginner
289 Views

Problem:

2D backwards FFT, passing both input array and output array. both complex. upon return I see that the output array is all zero and the input array has been totally changed. returned status is zero on all calls.

C Code:

===========================================

static complex Ip [2048][512]; // output of InterPolater
static complex RDop [2048][512]; // 2D FFT Output

DFTI_DESCRIPTOR_HANDLE ifft_handle;
long status, len[3];
len[0] = 512;
len[1] = 2048 ;
status = DftiCreateDescriptor( &ifft_handle, DFTI_SINGLE, DFTI_COMPLEX, 2, len);
status = DftiCommitDescriptor( ifft_handle);
status = DftiComputeBackward( ifft_handle, &(Ip[0][0]), &RDop); // 2D IFFT of Ip, result placed in Rdop
status = DftiFreeDescriptor(&ifft_handle);
===========================

What do I need to do to get the FFT output in RDop ? [Note: I have tried it both with and without the & on the array arguements. ] [Note also that the Ip array is filled -- no gaps, no stride issues]

thanks

0 Kudos
1 Reply
Dmitry_B_Intel
Employee
289 Views

Hi,

Default descriptor is in-place. You need to do DftiSetValue(ifft_handle,DFTI_PLACEMENT,DFTI_NOT_INPLACE) before DftiCommitDescriptor.

Also, C/C++ interface assumes row-major ordering, that is len should be initialized in reverse order, as { 2048, 512 }.

Thanks
Dima

0 Kudos
Reply