Computes the LU factorization of a general m-by-n matrix.
FORTRAN 77:
call sgetrf( m, n, a, lda, ipiv, info )
call dgetrf( m, n, a, lda, ipiv, info )
call cgetrf( m, n, a, lda, ipiv, info )
call zgetrf( m, n, a, lda, ipiv, info )
Fortran 95:
call getrf( a [,ipiv] [,info] )
This routine is declared in mkl_lapack.fi for FORTRAN 77 interface, in mkl_lapack.f90 for Fortran 95 interface, and in mkl_lapack.h for C interface.
The routine computes the LU factorization of a general m-by-n matrix A as
A = P*L*U,
where P is a permutation matrix, L is lower triangular with unit diagonal elements (lower trapezoidal if m > n) and U is upper triangular (upper trapezoidal if m < n). Usually A is square (m = n), and both L and U are triangular. The routine uses partial pivoting, with row interchanges.
NoteThis routine supports the Progress Routine feature. See Progress Routine for details.
INTEGER. The number of rows in the matrix A (m ≥ 0).
INTEGER. The number of columns in A; n ≥ 0.
REAL for sgetrf
DOUBLE PRECISION for dgetrf
COMPLEX for cgetrf
DOUBLE COMPLEX for zgetrf.
Array, DIMENSION (lda,*). Contains the matrix A. The second dimension of a must be at least max(1, n).
INTEGER. The first dimension of array a.
Overwritten by L and U. The unit diagonal elements of L are not stored.
INTEGER.
Array, DIMENSION at least max(1,min(m, n)). The pivot indices; for 1 ≤ i ≤ min(m, n) , row i was interchanged with row ipiv(i).
INTEGER. If info=0, the execution is successful.
If info = -i, the i-th parameter had an illegal value.
If info = i, uii is 0. The factorization has been completed, but U is exactly singular. Division by 0 will occur if you use the factor U for solving a system of linear equations.
Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or reconstructible arguments, see Fortran 95 Interface Conventions.
Specific details for the routine getrf interface are as follows:
Holds the matrix A of size (m,n).
Holds the vector of length min(m,n).
The computed L and U are the exact factors of a perturbed matrix A + E, where
|E| ≤ c(min(m,n))ε P|L||U|
c(n) is a modest linear function of n, and ε is the machine precision.
The approximate number of floating-point operations for real flavors is
If m = n,
If m > n,
If m < n.
The number of operations for complex flavors is four times greater.
After calling this routine with m = n, you can call the following: