Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 6/24/2024
Public

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

Document Table of Contents

Sequence of Invoking TT Routines

Computation of a transform using TT interface is conceptually divided into four steps, each of which is performed via a dedicated routine. Table "TT Interface Routines" lists the routines and briefly describes their purpose and use.

Most TT routines have versions operating with single-precision and double-precision data. Names of such routines begin respectively with "s" and "d". The wildcard "?" stands for either of these symbols in routine names.

TT Interface Routines

Routine

Description

?_init_trig_transform

Initializes basic data structures of Trigonometric Transforms.

?_commit_trig_transform

Checks consistency and correctness of user-defined data and creates a data structure to be used by Intel® oneAPI Math Kernel Library (oneMKL) FFT interface1.

?_forward_trig_transform

?_backward_trig_transform

Computes a forward/backward Trigonometric Transform of a specified type using the appropriate formula (see Transforms Implemented).

free_trig_transform

Releases the memory used by a data structure needed for calling FFT interface1.

1TT routines call Intel® oneAPI Math Kernel Library (oneMKL) FFT interface for better performance.

To find a transformed vector for a particular input vector only once, the Intel® oneAPI Math Kernel Library (oneMKL) TT interface routines are normally invoked in the order in which they are listed inTable "TT Interface Routines".

NOTE:

Though the order of invoking TT routines may be changed, it is highly recommended to follow the above order of routine calls.

The diagram in Figure "Typical Order of Invoking TT Interface Routines" indicates the typical order in which TT interface routines can be invoked in a general case (prefixes and suffixes in routine names are omitted).

Typical Order of Invoking TT Interface Routines

A general scheme of using TT routines for double-precision computations is shown below. A similar scheme holds for single-precision computations with the only difference in the initial letter of routine names.

...
    d_init_trig_transform(&n, &tt_type, ipar, dpar, &ir);
/* Change parameters in ipar if necessary. */
/* Note that the result of the Transform will be in f. If you want to preserve the data stored in f,
save it to another location before the function call below */
    d_commit_trig_transform(f, &handle, ipar, dpar, &ir);
    d_forward_trig_transform(f, &handle, ipar, dpar, &ir);
    d_backward_trig_transform(f, &handle, ipar, dpar, &ir);
    free_trig_transform(&handle, ipar, &ir);
/* here the user may clean the memory used by f, dpar, ipar */
...

You can find examples of code that uses TT interface routines to solve one-dimensional Helmholtz problem in the examples\pdettf\source folderin your Intel® oneAPI Math Kernel Library (oneMKL) directory.