Skip to main content

Module lapack

Module lapack 

Source
Expand description

Native LAPACK

Each function names the LAPACK routine it follows, so it can be checked against the reference source of the same name (LAPACK 3.12.1’s SRC/ and BLAS/SRC/).

§What is here

Every routine the crate’s public API needs has a native implementation. This table says where each one lives; the module’s own doc comment gives its pipeline.

RoutineWhere
dgetrf LU with partial pivotingdgetrf
dgetri inverse from LUdgetri
dgesv solve A X = Bdgesv
dpotrf Choleskydpotrf
dlange matrix normssuper::blas::dlange
dsyev symmetric eigen-decompositionsym
dgeev general eigen-decompositioneig
dgesvd real SVDsvd
dggev generalized eigen-decomposition (QZ)qz
zgetrf, zgetri, zgesv, zpotrfcomplex
zheev, zgeevzeig
zgesvd complex SVDzsvd
zggev complex QZqz

LapackError::NotImplemented is retained, and no routine returns it: a caller that reaches a routine with no native path still gets a runtime error naming the feature to enable rather than a link error, and a routine that is reverted keeps its error handling.

§Conventions

  • Column-major, data[i + j * n], matching crate::Matrix.
  • 0-based indices and usize lengths. LAPACK’s 1-based indices and its lda/lwork arguments are Fortran artifacts, not part of the math, so they do not appear here; the leading dimension of an n x n matrix is n.
  • Workspace is allocated inside each routine.
  • A driver returns Result<(), LapackError>, never LAPACK’s integer INFO: INFO < 0 (an illegal argument) and INFO > 0 (non-convergence, or a back-substitution failure) both become LapackError, so no caller has to remember which integer means what. Internal helpers still return INFO, because that is what the reference source says and what a diff against it should show; the drivers translate it at the boundary.

Re-exports§

pub use super::blas::dlange;

Modules§

complex
Native complex LAPACK
eig
Native real eigen-decompositions: dgeev and the pieces it is built from.
qz
The generalized eigenproblem A v = lambda B v for real and complex matrices: the QZ algorithm.
svd
Native singular value decomposition: dgesvd and the unblocked pieces it is built from.
sym
Native symmetric eigen-decomposition: dsyev and the pieces it is built from.
zeig
Native complex Hermitian eigen-decomposition: zheev and the unblocked pieces it is built from.
zsvd
Native complex singular value decomposition: zgesvd and the unblocked pieces it is built from.

Enums§

LapackError
Error kinds these routines can report.

Constants§

ZERO_DETERMINANT
Value below which a pivot counts as zero.

Functions§

dgesv
dgesv: solve A X = B for a single right-hand side.
dgetrf
dgetrf: LU factorization with partial pivoting, in place.
dgetrf_rect
dgetrf_rect: LU factorization of a rectangular panel with partial pivoting.
dgetri
dgetri: inverse of a matrix from its dgetrf factorization, in place.
dpotrf
dpotrf: Cholesky factorization A = L L^T, lower triangle, in place.
norm_char
The BLAS norm character for a crate::Norm discriminant.
not_implemented
Error used when a routine has no native implementation yet.