# LAPACK Routines¶

oneMKL provides a DPC++ interface to select routines from the Linear Algebra PACKage (LAPACK), as well as several LAPACK-like extension routines.

## LAPACK Linear Equation Routines¶

LAPACK Linear Equation routines are used for factoring a matrix, solving a system of linear equations, solving linear least squares problems, and inverting a matrix. The following table lists the LAPACK Linear Equation routine groups.

Routines

Description

geqrf

Computes the QR factorization of a general m-by-n matrix.

getrf

Computes the LU factorization of a general m-by-n matrix.

getri

Computes the inverse of an LU-factored general matrix.

getrs

Solves a system of linear equations with an LU-factored square coefficient matrix, with multiple right-hand sides.

orgqr

Generates the real orthogonal matrix $$Q$$ of the QR factorization formed by geqrf.

ormqr

Multiplies a real matrix by the orthogonal matrix $$Q$$ of the QR factorization formed by geqrf.

potrf

Computes the Cholesky factorization of a symmetric (Hermitian) positive-definite matrix.

potri

Computes the inverse of a Cholesky-factored symmetric (Hermitian) positive-definite matrix.

potrs

Solves a system of linear equations with a Cholesky-factored symmetric (Hermitian) positive-definite coefficient matrix, with multiple right-hand sides.

sytrf

Computes the Bunch-Kaufman factorization of a symmetric matrix.

trtrs

Solves a system of linear equations with a triangular coefficient matrix, with multiple right-hand sides.

ungqr

Generates the complex unitary matrix $$Q$$ of the QR factorization formed by geqrf.

unmqr

Multiplies a complex matrix by the unitary matrix $$Q$$ of the QR factorization formed by geqrf.

## LAPACK Singular Value and Eigenvalue Problem Routines¶

LAPACK Singular Value and Eigenvalue Problem routines are used for singular value and eigenvalue problems, and for performing a number of related computational tasks. The following table lists the LAPACK Singular Value and Eigenvalue Problem routine groups.

Routines

Description

gebrd

Reduces a general matrix to bidiagonal form.

gesvd

Computes the singular value decomposition of a general rectangular matrix.

heevd

Computes all eigenvalues and, optionally, all eigenvectors of a complex Hermitian matrix using divide and conquer algorithm.

hegvd

Computes all eigenvalues and, optionally, all eigenvectors of a complex generalized Hermitian definite eigenproblem using divide and conquer algorithm.

hetrd

Reduces a complex Hermitian matrix to tridiagonal form.

orgbr

Generates the real orthogonal matrix $$Q$$ or $$P^T$$ determined by gebrd.

orgtr

Generates the real orthogonal matrix $$Q$$ determined by sytrd.

ormtr

Multiplies a real matrix by the orthogonal matrix $$Q$$ determined by sytrd.

syevd

Computes all eigenvalues and, optionally, all eigenvectors of a real symmetric matrix using divide and conquer algorithm.

sygvd

Computes all eigenvalues and, optionally, all eigenvectors of a real generalized symmetric definite eigenproblem using divide and conquer algorithm.

sytrd

Reduces a real symmetric matrix to tridiagonal form.

ungbr

Generates the complex unitary matrix $$Q$$ or $$P^T$$ determined by gebrd.

ungtr

Generates the complex unitary matrix $$Q$$ determined by hetrd.

unmtr

Multiplies a complex matrix by the unitary matrix $$Q$$ determined by hetrd.

## LAPACK-like Extensions Routines¶

oneAPI Math Kernel Library DPC++ provides additional routines to extend the functionality of the LAPACK routines. These include routines to compute many independent factorizations, linear equation solutions, and similar. The following table lists the LAPACK-like Extensions routine groups.

Routines

Description

geqrf_batch

Computes the QR factorizations of a batch of general matrices.

getrf_batch

Computes the LU factorizations of a batch of general matrices.

getri_batch

Computes the inverses of a batch of LU-factored general matrices.

getrs_batch

Solves systems of linear equations with a batch of LU-factored square coefficient matrices, with multiple right-hand sides.

orgqr_batch

Generates the real orthogonal/complex unitary matrix $$Q_i$$ of the QR factorization formed by geqrf_batch.

potrf_batch

Computes the Cholesky factorization of a batch of symmetric (Hermitian) positive-definite matrices.

potrs_batch

Solves systems of linear equations with a batch of Cholesky-factored symmetric (Hermitian) positive-definite coefficient matrices, with multiple right-hand sides.

ungqr_batch

Generates the complex unitary matrix $$Q_i$$ with the QR factorization formed by geqrf_batch.