Developer Reference for Intel® oneAPI Math Kernel Library for C
DFTI_FWD_DISTANCE, DFTI_BWD_DISTANCE
The FFT interface enables computation of multiple transforms in one compute call. To specify the distribution of multiple data sets, use DFTI_FWD_DISTANCE for the distance between the first elements of consecutive forward-domain data sets and DFTI_BWD_DISTANCE for the corresponding distance between backward-domain data sets.
Each configuration setting is a value of MKL_LONG data type.
For DftiComputeForward, DFTI_FWD_DISTANCE describes the input and DFTI_BWD_DISTANCE describes the output. For DftiComputeBackward, DFTI_BWD_DISTANCE describes the input and DFTI_FWD_DISTANCE describes the output. Therefore, the same committed descriptor can be used for both computation directions without interchanging distance settings.
The default value of each distance is zero. Set the distances explicitly if DFTI_NUMBER_OF_TRANSFORMS is greater than one (see DFTI_NUMBER_OF_TRANSFORMS).
Each distance is counted in elements of the data type in its corresponding domain, rather than by the type of the variable passed to the computation function. Specifically, the DFTI_FORWARD_DOMAIN, DFTI_COMPLEX_STORAGE, and DFTI_CONJUGATE_EVEN_STORAGE configuration parameters define the element types shown in Table “Assumed Element Types in the Forward and Backward Domains”.
For multiple in-place transforms ( DFTI_PLACEMENT=DFTI_INPLACE ) that use the same physical layout in both domains, the forward-domain and backward-domain distances must be equivalent. When the domains use different physical layouts, set both distances explicitly. Ensure that corresponding forward-domain and backward-domain data sets concide in memory.
This example illustrates setting both domain distances for an in-place complex transform:
MKL_LONG dims[] = { nd, …, n2, n1 };
MKL_LONG distance = nd*…*n2*n1;
DftiCreateDescriptor( &hand, precision, DFTI_COMPLEX, d, dims );
DftiSetValue( hand, DFTI_NUMBER_OF_TRANSFORMS, (MKL_LONG)howmany );
DftiSetValue( hand, DFTI_FWD_DISTANCE, distance );
DftiSetValue( hand, DFTI_BWD_DISTANCE, distance );
To better understand configuration of the distances, see these code examples in your Intel® oneAPI Math Kernel Library (oneMKL) directory:
./examples/dftc/source/config_number_of_transforms.c