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

Convolution and Correlation

Intel® oneAPI Math Kernel Library (oneMKL) VS provides a set of routines intended to perform linear convolution and correlation transformations for single and double precision real and complex data.

For correct definition of implemented operations, see the Mathematical Notation and Definitions.

The current implementation provides:

  • Fourier algorithms for one-dimensional single and double precision real and complex data

  • Fourier algorithms for multi-dimensional single and double precision real and complex data

  • Direct algorithms for one-dimensional single and double precision real and complex data

  • Direct algorithms for multi-dimensional single and double precision real and complex data

One-dimensional algorithms cover the following functions from the IBM* ESSL library:

SCONF, SCORF
SCOND, SCORD
SDCON, SDCOR
DDCON, DDCOR
SDDCON, SDDCOR.

Special wrappers are designed to simulate these ESSL functions. The wrappers are provided as sample sources:

${MKL}/examples/vslf/essl/vsl_wrappers

Additionally, you can browse the examples demonstrating the calculation of the ESSL functions through the wrappers:

${MKL}/examples/vslf/essl

The convolution and correlation API provides interfaces for Fortran 90 and C/89 languages. You can use the Fortran 90 interface with programs written in Fortran.

Intel® oneAPI Math Kernel Library (oneMKL) provides the mkl_vsl.f90 header file. All header files are in the directory

${MKL}/include

See more details about the Fortran header in Random Number Generators topic.

The convolution and correlation API is implemented through task objects, or tasks. Task object is a data structure, or descriptor, which holds parameters that determine the specific convolution or correlation operation. Such parameters may be precision, type, and number of dimensions of user data, an identifier of the computation algorithm to be used, shapes of data arrays, and so on.

All the Intel® oneAPI Math Kernel Library (oneMKL) VS convolution and correlation routines process task objects in one way or another: either create a new task descriptor, change the parameter settings, compute mathematical results of the convolution or correlation using the stored parameters, or perform other operations. Accordingly, all routines are split into the following groups:

Task Constructors - routines that create a new task object descriptor and set up most common parameters.

Task Editors - routines that can set or modify some parameter settings in the existing task descriptor.

Task Execution Routines - compute results of the convolution or correlation operation over the actual input data, using the operation parameters held in the task descriptor.

Task Copy - routines used to make several copies of the task descriptor.

Task Destructors - routines that delete task objects and free the memory.

When the task is executed or copied for the first time, a special process runs which is called task commitment. During this process, consistency of task parameters is checked and the required work data are prepared. If the parameters are consistent, the task is tagged as committed successfully. The task remains committed until you edit its parameters. Hence, the task can be executed multiple times after a single commitment process. Since the task commitment process may include costly intermediate calculations such as preparation of Fourier transform of input data, launching the process only once can help speed up overall performance.