## Intel® oneAPI Math Kernel Library Cookbook

The Intel® oneAPI Math Kernel Library (oneMKL) contains many routines to help you solve various numerical problems, such as multiplying matrices, solving a system of equations, and performing a Fourier transform. While many problems do not have dedicated oneMKL routines, you can solve them by assembling the building blocks provided by oneMKL.

The Intel® oneAPI Math Kernel Library Cookbook includes these recipes to help you to assemble oneMKL routines for solving some more complex problems:

Matrix recipes using oneMKL PARDISO, BLAS, Sparse BLAS, and LAPACK routines

Finding an approximate solution to a nonlinear equation demonstrates a method of finding a solution to a nonlinear equation using oneMKL PARDISO, BLAS, and Sparse BLAS routines.

Factoring a block tridiagonal matrix uses oneMKL implementations of BLAS and LAPACK routines.

Solving a system of linear equations with an LU-factored block tridiagonal coefficient matrix extends the factoring recipe to solving a system of equations.

Factoring block tridiagonal symmetric positive definite matrices using BLAS and LAPACK routines demonstrates Cholesky factorization of a symmetric positive definite block tridiagonal matrix using BLAS and LAPACK routines.

Solving a system of linear equations with block tridiagonal symmetric positive definite coefficient matrix extends the factoring recipe to solving a system of equations using BLAS and LAPACK routines.

Computing principal angles between two subspaces uses LAPACK SVD to calculate the principal angles.

Computing principal angles between invariant subspaces of block triangular matrices extends the use of LAPACK SVD to the case where the subspaces are invariant subspaces of a block triangular matrix and are complementary to each other.

Fast Fourier Transform recipes

Evaluating a Fourier Integral uses oneMKL Fast Fourier Transform (FFT) interface to evaluate a continuous Fourier transform integral.

Using Fast Fourier Transforms for computer tomography image reconstruction uses oneMKL FFT interface to reconstruct an image from computer tomography data.

Numerics recipes

Noise filtering in financial market data streams uses oneMKL summary statistics routines for computing a correlation matrix for streaming data.

Using the Monte Carlo method for simulating European options pricing computes call and put European option prices with an oneMKL basic random number generator (BRNG).

Using the Black-Scholes formula for European options pricing speeds up Black-Scholes computation of European options pricing with oneMKL vector math functions.

Multiple simple random sampling without replacement generates

`K`simple random length-`M`samples without replacement from a population of size`N`for a large`K`.Using a histospline technique to scale images uses oneMKL data fitting functions for image scaling and spline interpolation for histospline computation.

Recipes for using oneMKL in different programming environments

Speeding up Python* scientific computations demonstrates a performance boost of Python code by building NumPy* and SciPy* sources with oneMKL and enabling oneMKL Automatic Offload.

Code examples in the cookbook are provided in Fortran for some recipes and in C for other recipes.

You can find code samples for Data Parallel C++ (DPC++) applications in the oneMKL repository. For more resources and to get started with oneMKL, visit Get Started with Intel® oneAPI Math Kernel Library