Content

FLENS-LAPACK Implementation

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.

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. But only claiming that we can achieve this two goals is one thing. The other thing is proving this! In this respect you could regard the FLENS-LAPACK as a prove of our claims. So our FLENS-LAPACK port demonstrates the following features:

Current Status

While it is a joy to port LAPACK to C++ we are still far from complete. And as we require that the resulting implementation is readable and understandable we can not completely automate the process:

At the moment we focus on porting LAPACK routines were data types are real and the involved matrix types have full storage:

But before you get lost in the details you might be interested in the following LAPACK driver routines that are currently implemented in FLENS.

Linear Equation Routines

TYPE

FLENS

DESCRIPTION

LAPACK

General

sv

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

Example: lapack-gesv.

dgesv

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

trs

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

dgetrs

tri

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

dgetri

Positive Definite

posv

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

dposv

potrf

Computes the Cholesky factorization of a symmetric positive definite matrix.

dpotrf

potrs

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

dpotrs

potri

Computes the inverse of a general matrix, using the Cholesky factorization.

dpotri

Triangular

trs

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

dtrtrs

tri

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

dtrtri

Orthogonal Factorizations

FLENS

DESCRIPTION

LAPACK

qrf

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

Example: lapack-geqrf.

dgeqrf

qrs

Solve the least squares problem \(\min\| AX - B \|\) using the \(QR\) factorization

dgeqrs

orgqr

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

dorgqr

ormqr

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

dormqr

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

Todo

Of course there many more TODOs. But theses are the most important:

Related Projects