DFTI_INPUT_DISTANCE, DFTI_OUTPUT_DISTANCE

The FFT interface in Intel MKL enables computation of multiple transforms. To compute multiple transforms, you need to specify the data distribution of the multiple sets of data. The distance between the first data elements of consecutive data sets, DFTI_INPUT_DISTANCE for input data or DFTI_OUTPUT_DISTANCE for output data, specifies the distribution. The configuration setting is a value of INTEGER data type in Fortran and MKL_LONG data type in C.

The default value for both configuration settings is one. You must set this parameter explicitly if the number of transforms is greater than one (see DFTI_NUMBER_OF_TRANSFORMS).

The distance is counted in elements of the data type defined by the descriptor configuration (rather than by the type of the variable passed to the computation functions). Specifically, the DFTI_FORWARD_DOMAIN, DFTI_COMPLEX_STORAGE, and DFTI_CONJUGATE_EVEN_STORAGE configuration parameters define the type of the elements as shown in Table "Assumed Element Types of the Input/Output Data".

For in-place transforms, the configuration set by DFTI_OUTPUT_DISTANCE is ignored except when the element types in forward and backward domains are different. If they are different, set DFTI_OUTPUT_DISTANCE explicitly (even though the transform is in-place). For in-place transforms, the configuration must be consistent, that is, the locations of the data sets on input and output must coincide. The DFTI_PLACEMENT configuration parameter defines whether the transform is in-place or out-of-place.

The configuration parameters define the distance within input and output data, and not within the forward-domain and backward-domain data. If the distances in the forward and backward domains differ, set DFTI_INPUT_DISTANCE and DFTI_OUTPUT_DISTANCE explicitly and then commit the descriptor before calling computation functions.

The following examples illustrate setting of the DFTI_INPUT_DISTANCE configuration parameter:

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, (MLK_LONG)howmany );
DftiSetValue( hand, DFTI_INPUT_DISTANCE,  distance );

! Fortran
INTEGER :: dims(d) = [n1, n2, …, nd]
INTEGER :: distance = n1*n2*…*nd
status = DftiCreateDescriptor( hand, precision, DFTI_COMPLEX, d, dims)
status = DftiSetValue( hand, DFTI_NUMBER_OF_TRANSFORMS, howmany )
status = DftiSetValue( hand, DFTI_INPUT_DISTANCE,  distance );

See Also


Submit feedback on this help topic