LAPACK
120px
Initial release 1992 (1992)
Stable release 3.4.1 / 20 April 2012; 2 months ago  (2012-04-20)
Written in Fortran 90
Type Software library
License BSD-new
Website www.netlib.org/lapack/

LAPACK (Linear Algebra PACKage) is a software library for numerical linear algebra. It provides routines for solving systems of linear equations and linear least squares, eigenvalue problems, and singular value decomposition. It also includes routines to implement the associated matrix factorizations such as LU, QR, Cholesky and Schur decomposition. LAPACK was originally written in FORTRAN 77, but moved to Fortran 90 in version 3.2 (2008).[1] The routines handle both real and complex matrices in both single and double precision.

LAPACK can be seen as the successor to the linear equations and linear least-squares routines of LINPACK and the eigenvalue routines of EISPACK. LINPACK was designed to run on the then-modern vector computers with shared memory. LAPACK, in contrast, depends upon the Basic Linear Algebra Subprograms (BLAS) in order to effectively exploit the caches on modern cache-based architectures, and thus can run orders of magnitude faster than LINPACK on such machines, given a well-tuned BLAS implementation. LAPACK has also been extended to run on distributed-memory systems in later packages such as ScaLAPACK and PLAPACK.

LAPACK is licensed under a three-clause BSD style license, a permissive free software license with few restrictions.

Contents

Use with other programming languages [link]

Many programming environments today support the use of libraries with C binding. The LAPACK routines can be used like C functions if a few restrictions are observed.

Several alternative language bindings are also available:

Naming scheme [link]

Subroutines in LAPACK have a characteristic naming convention which makes the identifiers short but rather obscure. This was necessary as the first Fortran standards only supported identifiers up to six characters long, so the names had to be shortened to fit into this limit.

A LAPACK subroutine name is in the form pmmaaa, where:

  • p is a one-letter code denoting the type of numerical constants used. S, D stand for real floating point arithmetic respectively in single and double precision, while C and Z stand for complex arithmetic with respectively single and double precision. The newer version LAPACK95 use generic subroutines in order to overcome the need to explicitly specify the data type.
  • mm is a two-letter code denoting the kind of matrix expected by the algorithm. The codes for the different kind of matrices are reported below; the actual data are stored in a different format depending on the specific kind; e.g., when the code DI is given, the subroutine expects a vector of length n containing the elements on the diagonal, while when the code GE is given, the subroutine expects an n×n array containing the entries of the matrix.
  • aaa is a one- to three-letter code describing the actual algorithm implemented in the subroutine, e.g. SV denotes a subroutine to solve linear system, while R denotes a rank-1 update.

For example, the subroutine to solve a linear system with a general (non-structured) matrix using real double-precision arithmetic is called DGESV.

Matrix types in the LAPACK naming scheme
Name Description
BD Bidiagonal matrix
DI Diagonal matrix
GB Band matrix
GE Matrix (i.e., unsymmetric, in some cases rectangular)
GG general matrices, generalized problem (i.e., a pair of general matrices)
GT Tridiagonal Matrix General Matrix
HB (complex) Hermitian matrix Band matrix
HE (complex) Hermitian matrix
HG upper Hessenberg matrix, generalized problem (i.e. a Hessenberg and a Triangular matrix)
HP (complex) Hermitian matrix, Packed storage matrix
HS upper Hessenberg matrix
OP (real) Orthogonal matrix, Packed storage matrix
OR (real) Orthogonal matrix
PB Symmetric matrix or Hermitian matrix positive definite band
PO Symmetric matrix or Hermitian matrix positive definite
PP Symmetric matrix or Hermitian matrix positive definite, Packed storage matrix
PT Symmetric matrix or Hermitian matrix positive definite Tridiagonal matrix
SB (real) Symmetric matrix Band matrix
SP Symmetric matrix, Packed storage matrix
ST (real) Symmetric matrix Tridiagonal matrix
SY Symmetric matrix
TB Triangular matrix Band matrix
TG triangular matrices, generalized problem (i.e., a pair of triangular matrices)
TP Triangular matrix, Packed storage matrix
TR Triangular matrix (or in some cases quasi-triangular)
TZ Trapezoidal matrix
UN (complex) Unitary matrix
UP (complex) Unitary matrix, Packed storage matrix

Details on this scheme can be found in the Naming scheme section in LAPACK Users' Guide.

See also [link]

References [link]

Further reading [link]

External links [link]


https://wn.com/LAPACK

LAPACK++

LAPACK++, the Linear Algebra PACKage in C++, is a computer software library of algorithms for numerical linear algebra that solves systems of linear equations and eigenvalue problems.

It supports various matrix classes for vectors, non-symmetric matrices, SPD matrices, symmetric matrices, banded, triangular, and tridiagonal matrices. However, it does not include all of the capabilities of original LAPACK library.

History

The original LAPACK++ (up to v1.1a) was written by R. Pozo et al. at the University of Tennessee and Oak Ridge National Laboratory. In 2000, R. Pozo et al. left the project, with the projects' web page stating LAPACK++ would be superseded by the Template Numerical Toolkit (TNT).

The current LAPACK++ (versions 1.9 onwards) started off as a fork from the original LAPACK++. There are extensive fixes and changes, such as more wrapper functions for LAPACK and BLAS routines.

See also

  • list of numerical analysis software
  • Armadillo C++ linear algebra library
  • External links

  • old LAPACK++ Homepage (version 1.1a)
  • Podcasts:

    PLAYLIST TIME:
    ×