Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

DftiComputeForwardDM

Computes the forward FFT.

Syntax

status = DftiComputeForwardDM(handle, in_X, out_X);

status = DftiComputeForwardDM(handle, in_out_X);

Include Files

  • mkl_cdft.h

Input Parameters

handle
The descriptor handle.
in_X, in_out_X
Local part of input data. Array of real or complex values (depending on the forward domain type). Refer to Distributing Data among Processes on how to allocate and initialize the array.

Output Parameters

out_X, in_out_X
Local part of output data. Array of complex values. Refer to Distributing Data among Processes on how to allocate the array.

Description

The DftiComputeForwardDM function computes the forward FFT. Forward FFT is the transform using the factor e-i2π/n.

Before you call the function, the valid descriptor, created by DftiCreateDescriptorDM, must be configured and committed using the DftiCommitDescriptorDM function.

The computation is carried out by an internal call to the DftiComputeForward function. So, the functions have very much in common, and details not explicitly mentioned below can be found in the description of DftiComputeForward.

The local part of input data, as well as the local part of the output data, is an appropriate sequence of real or complex values (each complex value consists of two real numbers: real part and imaginary part) that a particular process stores. See Distributing Data Among Processes for details.

Refer to Configuration Settings for the list of configuration parameters that the descriptor passes to the function.

The configuration parameter DFTI_PRECISION determines the precision of input data, output data, and transform: a setting of DFTI_SINGLE indicates single-precision floating-point data type and a setting of DFTI_DOUBLE indicates double-precision floating-point data type.

The configuration parameter DFTI_PLACEMENT informs the function whether the computation should be in-place. If the value of this parameter is DFTI_INPLACE (default), you must call the function with two parameters, otherwise you must supply three parameters. If DFTI_PLACEMENT = DFTI_INPLACE and three parameters are supplied, then the third parameter is ignored.

CAUTION:

Even in case of an out-of-place transform, local array of input data in_X may be changed. To save data, make its copy before calling DftiComputeForwardDM.

In case of an in-place transform, DftiComputeForwardDM dynamically allocates and deallocates a work buffer of the same size as the local input/output array requires.

NOTE:

You can specify your own workspace of the same size through the configuration parameter CDFT_WORKSPACE to avoid redundant memory allocation.

Return Values

The function returns DFTI_NO_ERROR when completes successfully. If the function fails, it returns a value of another error class constant (for the list of constants, refer to Error Codes).

Prototype

   
MKL_LONG DftiComputeForwardDM(DFTI_DESCRIPTOR_DM_HANDLE handle, void *in_X,...);