Vector Arguments in BLAS

Vector arguments are passed in one-dimensional arrays. The array dimension (length) and vector increment are passed as integer variables. The length determines the number of elements in the vector. The increment (also called stride) determines the spacing between vector elements and the order of the elements in the array in which the vector is passed.

Vector Arguments in VML

Vector arguments of VML mathematical functions are passed in one-dimensional arrays with unit vector increment. It means that a vector of length n is passed contiguously in an array a whose values are defined as `a[0], a[1], ..., a[n-1]` (for the C interface).

Matrix Arguments

Matrix arguments of the Intel® Math Kernel Library routines can be stored in either one- or two-dimensional arrays, using the following storage schemes:

Appendix E: Code Examples

This appendix presents code examples of using some Intel MKL routines and functions. You can find here example code written in both Fortran and C.

Please refer to respective sections in the manual for detailed descriptions of function parameters and operation.

Fourier Transform Functions Code Examples

This section presents code examples for functions described in the “FFT Functions” and “Cluster FFT Functionssubsections in the “Fourier Transform Functions” section. The examples are grouped in subsections

Examples of Using Multi-Threading for FFT Computation

The following sample program shows how to employ internal threading in Intel MKL for FFT computation.

To specify the number of threads inside Intel MKL, use the following settings:

set `MKL_NUM_THREADS = 1` for one-threaded mode;

set `MKL_NUM_THREADS = 4` for multi-threaded mode.

Examples for Cluster FFT Functions

2D Out-of-place Cluster FFT Computation

The following C example computes a 2-dimensional out-of-place FFT using the cluster FFT interface:

Auxiliary Data Transformations

This section presents C examples for conversion from the Cartesian to polar representation of complex data and vice versa.