# FFT Interface

To use the FFT functions, you need to access the module `MKL_DFTI` through the "use" statement in Fortran; or access the header file mkl_dfti.h through "include" in C.

The Fortran interface provides a derived type DFTI_DESCRIPTOR; a number of named constants representing various names of configuration parameters and their possible values; and a number of overloaded functions through the generic functionality of Fortran 95.

The C interface provides a structure type DFTI_DESCRIPTOR, a macro definition
`#define DFTI_DESCRIPTOR_HANDLE DFTI_DESCRIPTOR *`

a number of named constants of two enumeration types `DFTI_CONFIG_PARAM` and `DFTI_CONFIG_VALUE`; and a number of functions, some of which accept different number of input arguments.

### Note

Some of the FFT functions and/or functionality may not be supported by the currently available implementation of the library. You can find the complete list of the implementation-specific exceptions in the release notes to your version of the library.

There are four main categories of FFT functions in Intel MKL:

1. Descriptor Manipulation. There are four functions in this category. The first one, DftiCreateDescriptor, creates an FFT descriptor whose storage is allocated dynamically. This function configures the descriptor with default settings corresponding to a few input values supplied by the user.

   The second, DftiCommitDescriptor, "commits" the descriptor to all its setting. In practice, this usually means that all the necessary precomputation will be performed. This may include factorization of the input length and computation of all the required twiddle factors. The third function, DftiCopyDescriptor, makes an extra copy of a descriptor, and the fourth function, DftiFreeDescriptor, frees up all the memory allocated for the descriptor information.

2. FFT Computation. There are two functions in this category. The first, DftiComputeForward, performs the forward FFT computation, and the second function, DftiComputeBackward, performs a backward FFT computation.

3. Descriptor configuration. There are two functions in this category. One function, DftiSetValue, sets one specific value to one of the many configuration parameters that are changeable (a few are not); the other, DftiGetValue, gets the current value of any one of these configuration parameters (all are readable). These parameters, though many, are handled one-at-a-time.

4. Status Checking. The functions described in the three categories above return an integer value denoting the status of the operation. In particular, a non-zero return value always indicates a problem of some sort. Envisioned to be further enhanced in later releases of Intel MKL, FFT interface at present provides for one logical status class function, DftiErrorClass, and a simple status message generation function, DftiErrorMessage.

Parent topic: FFT Functions