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

DftiComputeBackward

david_mayes
Beginner
656 Views
Why does performing DftiComputeBackward with the results of DftiComputeForward not result in the original input? I get results which are much larger (scaled by num_rows x num_cols?). For example if the input is {0.33, -0.18, -0.4...} and the dimensions are 32x48, theresult from DftiComputeBackwardis {511, -276, -614, ...} I'm setting up the descriptorlike this:
Code:
   status = DftiCreateDescriptor( &my_desc3_handle, // Desc_Handle
                                  DFTI_SINGLE,      // Precision      
                                  DFTI_COMPLEX,     // Forward_Domain
                                  2,                // Dimension    
                                  dim);             // Length          

---
Dave Mayes
0 Kudos
1 Reply
Todd_R_Intel
Employee
657 Views

Take a look at the "Configuration Settings" section of the Fourier Transform chapter of the MKLmanual. There is a subsection name "Scale" which reads as follows (emphasis is mine):

Scale

The forward transform and backward transform are each associated with a scale factor of its own with default value of 1. The user can set one or both of them via the two configuration parameters DFTI_FORWARD_SCALE and DFTI_BACKWARD_SCALE. For example, for a one-dimensional transform of length n, one can use the default scale of 1 for the forward transform while setting the scale factor for backward transform to be 1/n, making the backward transform the inverse of the forward transform.

The scale factor configuration parameter should be set by a real floating-point data type of the same precision as the value for DFTI_PRECISION.

-Todd

0 Kudos
Reply