# ComputeBackward

Computes the backward FFT.

## Syntax

Fortran:

Status = DftiComputeBackward( Desc_Handle, X_inout )

Status = DftiComputeBackward( Desc_Handle, X_in, X_out )

C:

status = DftiComputeBackward( desc_handle, x_inout );

status = DftiComputeBackward( desc_handle, x_in, x_out );

## Description

As soon as a descriptor is configured and committed successfully, actual computation of the FFT can be performed. The DftiComputeBackward function computes the backward FFT.

This is the transform using the factor `ei2π/n`. Because of the flexibility in configuration, input data can be represented in various ways as well as output result can be placed differently. Consequently, the number of input parameters as well as their type vary. This variation is accommodated by the generic function facility of Fortran 95. Data and result parameters are all declared as assumed-size rank-1 array DIMENSION(0:*). The function returns `DFTI_NO_ERROR` when completes successfully. See Status Checking Functions for more information on returned status.

## Interface and Prototype

! Fortran Interface

INTERFACE DftiComputeBackward

//Note that the body provided here is to illustrate the different

//argument list and types of dummy arguments. The interface

//does not guarantee what the actual function names are.

//Users can only rely on the function name following the

//keyword INTERFACE

// One argument single precision complex

FUNCTION some_actual_function_5_C( Desc_Handle, X )

INTEGER :: some_actual_function_5_C

TYPE(DFTI_DESCRIPTOR), POINTER :: Desc_Handle

COMPLEX, INTENT(INOUT) :: X(*)

END FUNCTION some_actual_function_5_C

// One argument double precision complex

FUNCTION some_actual_function_5_Z( Desc_Handle, X )

INTEGER :: some_actual_function_5_Z

TYPE(DFTI_DESCRIPTOR), POINTER :: Desc_Handle

COMPLEX (Kind((0D0,0D0))), INTENT(INOUT) :: X(*)

END FUNCTION some_actual_function_5_Z

// One argument single precision real

FUNCTION some_actual_function_5_R( Desc_Handle, X )

INTEGER :: some_actual_function_5_R

TYPE(DFTI_DESCRIPTOR), POINTER :: Desc_Handle

REAL, INTENT(INOUT) :: X(*)

END FUNCTION some_actual_function_5_R

// One argument double precision real

...

// Two argument single precision complex

...

...

FUNCTION some_actual_function_5_CC( Desc_Handle, X_In, Y_Out )

INTEGER :: some_actual_function_5_CC

TYPE(DFTI_DESCRIPTOR), POINTER :: Desc_Handle

COMPLEX, INTENT(IN) :: X_In(*)

COMPLEX, INTENT(OUT) :: Y_Out(*)

END FUNCTION some_actual_function_5_CCEND INTERFACE DftiComputeBackward END INTERFACE DftiComputeBackward

/* C prototype */

long DftiComputeBackward( DFTI_DESCRIPTOR_HANDLE,

void *,

... );

The implementations of the FFT interface expect the data be treated as data stored linearly in memory with a regular "stride" pattern (discussed more fully in Strides, see also [3]). The function expects the starting address of the first element. Hence we use the assume-size declaration in Fortran.

The descriptor by itself contains sufficient information to determine exactly how many arguments and of what type should be present. The implementation could use this information to check against possible input inconsistency.

Parent topic: FFT Computation Functions