# Implementation Details

Several aspects of the Intel MKL TT interface are platform-specific and language-specific. To promote portability across platforms and ease of use across different languages, users are provided with the TT language-specific header files to include in their code. Currently, the following of them are available:

- mkl_trig_transforms.h, to be used together with mkl_dfti.h, for C programs.
- mkl_trig_transforms.f90, to be used together with mkl_dfti.f90, for Fortran 90 programs.

### Note

Use of the Intel MKL TT software without including one of the above header files is not supported.

## C-specific Header File

The C-specific header file defines the following function prototypes:

void d_init_trig_transform(int *, int *, int *, double *, int *);

void d_commit_trig_transform(double *, DFTI_DESCRIPTOR_HANDLE *, int *, double *, int *);

void d_forward_trig_transform(double *, DFTI_DESCRIPTOR_HANDLE *, int *, double *, int *);

void d_backward_trig_transform(double *, DFTI_DESCRIPTOR_HANDLE *, int *, double *, int *);

void s_init_trig_transform(int *, int *, int *, float *, int *);

void s_commit_trig_transform(float *, DFTI_DESCRIPTOR_HANDLE *, int *, float *, int *);

void s_forward_trig_transform(float *, DFTI_DESCRIPTOR_HANDLE *, int *, float *, int *);

void s_backward_trig_transform(float *, DFTI_DESCRIPTOR_HANDLE *, int *, float *, int *);

void free_trig_transform(DFTI_DESCRIPTOR_HANDLE *, int *, int *);

## Fortran-Specific Header File

The Fortran90-specific header file defines the following function prototypes:

SUBROUTINE D_INIT_TRIG_TRANSFORM(n, tt_type, ipar, dpar, stat)

INTEGER, INTENT(IN) :: n, tt_type

INTEGER, INTENT(INOUT) :: ipar(*)

REAL(8), INTENT(INOUT) :: dpar(*)

INTEGER, INTENT(OUT) :: stat

END SUBROUTINE D_INIT_TRIG_TRANSFORM

SUBROUTINE D_COMMIT_TRIG_TRANSFORM(f, handle, ipar, dpar, stat)

REAL(8), INTENT(INOUT) :: f(*)

TYPE(DFTI_DESCRIPTOR), POINTER :: handle

INTEGER, INTENT(INOUT) :: ipar(*)

REAL(8), INTENT(INOUT) :: dpar(*)

INTEGER, INTENT(OUT) :: stat

END SUBROUTINE D_COMMIT_TRIG_TRANSFORM

SUBROUTINE D_FORWARD_TRIG_TRANSFORM(f, handle, ipar, dpar, stat)

REAL(8), INTENT(INOUT) :: f(*)

TYPE(DFTI_DESCRIPTOR), POINTER :: handle

INTEGER, INTENT(INOUT) :: ipar(*)

REAL(8), INTENT(INOUT) :: dpar(*)

INTEGER, INTENT(OUT) :: stat

END SUBROUTINE D_FORWARD_TRIG_TRANSFORM

SUBROUTINE D_BACKWARD_TRIG_TRANSFORM(f, handle, ipar, dpar, stat)

REAL(8), INTENT(INOUT) :: f(*)

TYPE(DFTI_DESCRIPTOR), POINTER :: handle

INTEGER, INTENT(INOUT) :: ipar(*)

REAL(8), INTENT(INOUT) :: dpar(*)

INTEGER, INTENT(OUT) :: stat

END SUBROUTINE D_BACKWARD_TRIG_TRANSFORM

SUBROUTINE S_INIT_TRIG_TRANSFORM(n, tt_type, ipar, spar, stat)

INTEGER, INTENT(IN) :: n, tt_type

INTEGER, INTENT(INOUT) :: ipar(*)

REAL(4), INTENT(INOUT) :: spar(*)

INTEGER, INTENT(OUT) :: stat

END SUBROUTINE S_INIT_TRIG_TRANSFORM

SUBROUTINE S_COMMIT_TRIG_TRANSFORM(f, handle, ipar, spar, stat)

REAL(4), INTENT(INOUT) :: f(*)

TYPE(DFTI_DESCRIPTOR), POINTER :: handle

INTEGER, INTENT(INOUT) :: ipar(*)

REAL(4), INTENT(INOUT) :: spar(*)

INTEGER, INTENT(OUT) :: stat

END SUBROUTINE S_COMMIT_TRIG_TRANSFORM

SUBROUTINE S_FORWARD_TRIG_TRANSFORM(f, handle, ipar, spar, stat)

REAL(4), INTENT(INOUT) :: f(*)

TYPE(DFTI_DESCRIPTOR), POINTER :: handle

INTEGER, INTENT(INOUT) :: ipar(*)

REAL(4), INTENT(INOUT) :: spar(*)

INTEGER, INTENT(OUT) :: stat

END SUBROUTINE S_FORWARD_TRIG_TRANSFORM

SUBROUTINE S_BACKWARD_TRIG_TRANSFORM(f, handle, ipar, spar, stat)

REAL(4), INTENT(INOUT) :: f(*)

TYPE(DFTI_DESCRIPTOR), POINTER :: handle

INTEGER, INTENT(INOUT) :: ipar(*)

REAL(4), INTENT(INOUT) :: spar(*)

INTEGER, INTENT(OUT) :: stat

END SUBROUTINE S_BACKWARD_TRIG_TRANSFORM

SUBROUTINE FREE_TRIG_TRANSFORM(handle, ipar, stat)

INTEGER, INTENT(INOUT) :: ipar(*)

TYPE(DFTI_DESCRIPTOR), POINTER :: handle

INTEGER, INTENT(OUT) :: stat

END SUBROUTINE FREE_TRIG_TRANSFORM

Fortran 90 specifics of the TT routines usage are similar for all Intel MKL PDE support tools and described in Calling PDE Support Routines from Fortran 90.

Parent topic: Trigonometric Transform Routines