Content

FLENS-LAPACK

At the moment we are working on a C++ port of LAPACK. Sound tedious? It is a joy with FLENS! This is because FLENS gives you easy-to-use tools for implementing efficient, robust and reliable numerical software.

Not all LAPACK function have been ported so far. However, if you have an external LAPACK implementation on your system then you can use FLENS-LAPACK as a high-level interface. FLENS-LAPACK accesses the external LAPACK library through the low-level CXXLAPACK layer. The usage and concept of this high-level (CXX)LAPACK interface is illustrated in the tutorial.

Generic FLENS-LAPACK: Purpose

FLENS is a comfortable tool for the implementation of numerical algorithms. At the same time we avoid negative impacts on efficiency due to abstraction. Our FLENS-LAPACK port demonstrates the following features of FLENS:

Current Status

Below we give an overview of the functionality currently provided by FLENS-LAPACK. Function names of FLENS-LAPACK are derived from corresponding LAPACK. We removed letters from the function names that merely specify the argument types:

At the moment only a subset of LAPACK is re-implemented in FLENS-LAPACK. For other LAPACK functions FLENS-LAPACK serves as a high-level interface. Have a look into the tutorial for learning how to use an external LAPACK implementation. By default FLENS-LAPACK will prefer a generic LAPACK implementation over a external implementation. An external implementation only gets called if no generic implementation is available. You can change this default behavior through macros as described in the tutorial.

Routines for Matrices with Full Storage

Linear Equation Routines

TYPE

FLENS-LAPACK

DESCRIPTION

LAPACK

General

sv

Solves a general system of linear equations \(AX=B\).

Example: lapack-gesv.

dgesv, zgesv

svx

Solves a general system of linear equations \(AX=B\). Error bounds on the solution and a condition estimate are also provided.

dgesvx

trf

Computes an \(LU\) factorization of a general matrix, using partial pivoting with row interchanges.

Example: lapack-getrf.

dgetrf, zgetrf

trs

Solves a general system of linear equations \(AX=B,\) \(A^T X=B,\) or \(A^H X=B,\) using the \(LU\) factorization.

Example: lapack-getrs.

dgetrs, zgetrs

tri

Computes the inverse of a general matrix, using the \(LU\) factorization.

Example: lapack-getri.

dgetri, zgetri1

Positive Definite

posv

Solves a symmetric positive definite system of linear equations \(AX=B.\)

Example: lapack-posv.

dposv zposv1

potrf

Computes the Cholesky factorization of a symmetric positive definite matrix.

Example: lapack-potrs, lapack-potri.

dpotrf, zpotrf1

potrs

Solves a symmetric positive definite system of linear equations \(AX=B,\) using the Cholesky factorization computed by potrf.

Example: lapack-potrs.

dpotrs, zpotrs1

potri

Computes the inverse of a positive definite matrix, using the Cholesky factorization computed by potrf.

Example: lapack-potri.

dpotri, zpotri1

Triangular

trs

Solves a triangular system of linear equations \(AX=B,\) \(A^T X=B,\) or \(A^H X=B,\) using the \(LU\) factorization.

Example: lapack-trtrs.

dtrtrs, ztrtrs

tri

Computes the inverse of a triangular matrix, using the \(LU\) factorization.

Example: lapack-trtri.

dtrtri, ztrtri1

Orthogonal Factorizations

FLENS

DESCRIPTION

LAPACK

qrf

Computes a \(QR\) factorization of a general rectangular matrix.

Example: lapack-geqrf.

dgeqrf, zgeqrf1

qp3

Computes a \(QR\) factorization with column pivoting of a matrix \(A\) such that \(AP = QP\).

Example: lapack-geqp3.

dgeqp3, zgeqp31

orgqr, ungqr

Generates all or part of the orthogonal/unitary matrix \(Q\) from a \(QR\) factorization.

Example: lapack-orgqr, lapack-ungqr.

dorgqr, zungqr1

ormqr, unmqr

Multiplies a general matrix by the orthogonal/unitary matrix \(Q\) from a \(QR\) factorization.

Example: lapack-ormqr, lapack-unmqr.

dormqr, zunmqr1

lqf

Computes a \(LQ\) factorization of a general rectangular matrix.

Example: lapack-gelqf.

dgelqf, zgelqf1

ormlq, unmlq

Multiplies a general matrix by the orthogonal/unitary matrix \(Q\) from a \(LQ\) factorization.

Example: see lapack-gelqf.

dormlq, zunmlq1

orglq, unglq

Generates all or part of the orthogonal/unitary matrix \(Q\) from a \(LQ\) factorization.

Example: lapack-orglq, lapack-unglq.

dorglq, zunglq1

Least Square Problems

FLENS

DESCRIPTION

LAPACK

ls

Solves overdetermined or underdetermined real linear systems involving an \(m \times n\) matrix \(A\), or its transpose, using a \(QR\) or \(LQ\) factorization of \(A\). It is assumed that \(A\) has full rank.

The following options are provided:

  • If \(m \geq n\):

    • find the least squares solution of an overdetermined system, i.e., solve the least squares problem: minimize \(\| B - AX \|\) or

    • find the minimum norm solution of an undetermined system \(A^T X = B\) (or \(A^H X =B\)).

  • If \(m < n\):

    • find the minimum norm solution of an underdetermined system \(A X = B\) or

    • find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize \(\| B - A^T X \|\) (or \(\| B - A^H X \|\)).

Example: lapack-gels.

dgels, zgels1

lsy

Computes the minimum-norm solution to a real linear least squares problem: minimize \(\| A X - B \|\) using a complete orthogonal factorization of \(A\). \(A\) is an \(m \times n\) matrix which may be rank-deficient. The rank of \(A\) gets determined using a incremental condition estimation.

Example: lapack-gelsy.

dgelsy, zgelsy1

Non-Symmetric Eigenvalue Routines

FLENS

DESCRIPTION

LAPACK

ev

Computes the eigenvalues and left and right eigenvectors of a general matrix.

Example: lapack-geev.

dgeev

evx

Computes the eigenvalues and left and right eigenvectors of a general matrix. Optionally also, it computes a balancing transformation to improve the conditioning of the eigenvalues and eigenvectors, reciprocal condition numbers for the eigenvalues, and reciprocal condition numbers for the right eigenvectors.

dgeevx

es

Computes for a general matrix, the eigenvalues, the real Schur form \(T\), and, optionally, the matrix of Schur vectors \(Z\). This gives the Schur factorization \(A = Z T Z^T.\)

dgees

esx

Like es but optionally, it also orders the eigenvalues on the diagonal of the real Schur form so that selected eigenvalues are at the top left; computes a reciprocal condition number for the average of the selected eigenvalues; and computes a reciprocal condition number for the right invariant subspace corresponding to the selected eigenvalues. The leading columns of \(Z\) form an orthonormal basis for this invariant subspace.

dgeesx

hrd

Reduces a general matrix to upper Hessenberg form by an orthogonal similarity transformation.

dgehrd

orghr

Generates the orthogonal transformation matrix from a reduction to Hessenberg form.

dorghr

Symmetric Eigenvalue Routines

FLENS

DESCRIPTION

LAPACK

ev

Computes the eigenvalues and eigenvectors of a general matrix.

Example: lapack-syev.

dsyev1

Routines for Matrices with Band Storage

Linear Equation Routines

TYPE

FLENS-LAPACK

DESCRIPTION

LAPACK

General

sv

Solves a general system of linear equations \(AX=B\).

Example: lapack-gbsv.

dgbsv1 zgbsv1

trf

Computes an \(LU\) factorization of a general matrix, using partial pivoting with row interchanges.

Example: see lapack-gbtrs.

dgbtrf1 zgbtrf1

trs

Solves a general system of linear equations \(AX=B,\) \(A^T X=B,\) or \(A^H X=B,\) using the \(LU\) factorization.

Example: lapack-gbtrs.

dgbtrs1 zgbtrs1

Positive Definite

pbsv

Solves a symmetric positive definite system of linear equations \(AX=B.\)

Example: lapack-pbsv.

dpbsv1 zpbsv1

pbtrf

Computes the Cholesky factorization of a symmetric positive definite matrix.

Example: see lapack-pbtrs.

dpbtrf1 zpbtrf1

pbtrs

Solves a symmetric positive definite system of linear equations \(AX=B,\) using the Cholesky factorization computed by pbtrf.

Example: lapack-pbtrs.

dpbtrs1 zpbtrs1

Note: Maybe we should brake with the strict naming scheme and rename functions pbsv, pbtrf, pbtrs just to posv, potrf, potrs.

Related Projects

Footnotes