SRC/sgetrf.f(3)
π¦ sgetrf β SRC/sgetrf.f(3) π¦
okay so bestie, real talk: this page lives in the Library Functions Manual and it's all about SRC/sgetrf.f, which is genuinely one of the most iconic files in LAPACK. LU factorization?? on a general matrix?? with partial pivoting?? she ate, no cap. let's get into it π
β¨ NAME β¨
SRC/sgetrf.f β that's the whole name, she's lowkey mysterious like that π
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine sgetrf (m, n, a, lda, ipiv, info)β literally the whole vibe. this isSGETRFβ¨
subroutine sgetrf (integer m, integer n, real, dimension( lda, * ) a,
integer lda, integer, dimension( * ) ipiv, integer info)
π Function/Subroutine Documentation π
β subroutine sgetrf β
subroutine sgetrf (integer m, integer n, real, dimension( lda, * ) a,
integer lda, integer, dimension( * ) ipiv, integer info)
π«Ά SGETRF β say her name, she's famous
π Purpose π
okay so here's the tea, straight from the source:
!>
!> SGETRF computes an LU factorization of a general M-by-N matrix A
!> using partial pivoting with row interchanges.
!>
!> The factorization has the form
!> 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).
!>
!> This is the right-looking Level 3 BLAS version of the algorithm.
!>
so basically: she factors A into A = P * L * U, where P is a permutation matrix, L is lower triangular with unit diagonal elements (lower trapezoidal if m > n, and yes the trapezoid era is real π), and U is upper triangular (upper trapezoidal if m < n). she's the right-looking Level 3 BLAS version of the algorithm, which is giving main character energy fr fr π₯
π Parameters π
M
!> M is INTEGER
!> The number of rows of the matrix A. M >= 0.
!>
M is an INTEGER β the number of rows of the matrix A. she requires M >= 0 β
N
!> N is INTEGER
!> The number of columns of the matrix A. N >= 0.
!>
N is an INTEGER β the number of columns of the matrix A. also N >= 0, we love a boundary π
A
!> A is REAL array, dimension (LDA,N)
!> On entry, the M-by-N matrix to be factored.
!> On exit, the factors L and U from the factorization
!> A = P*L*U; the unit diagonal elements of L are not stored.
!>
A is a REAL array, dimension (LDA,N). on entry, it's the M-by-N matrix to be factored. on exit, it holds the factors L and U from the factorization A = P*L*U β and bestie, listen, the unit diagonal elements of L are not stored. she said "save space, stay slay" π¦
LDA
!> LDA is INTEGER
!> The leading dimension of the array A. LDA >= max(1,M).
!>
LDA is an INTEGER β the leading dimension of the array A, and it has to be LDA >= max(1,M). respect the leading dimension or perish π
IPIV
!> IPIV is INTEGER array, dimension (min(M,N))
!> The pivot indices; for 1 <= i <= min(M,N), row i of the
!> matrix was interchanged with row IPIV(i).
!>
IPIV is an INTEGER array, dimension (min(M,N)). these are the pivot indices β for 1 <= i <= min(M,N), row i of the matrix was interchanged with row IPIV(i). she's tracking every swap, she's organized like that π
INFO
!> INFO is INTEGER
!> = 0: successful exit
!> < 0: if INFO = -i, the i-th argument had an illegal value
!> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
!> has been completed, but the factor U is exactly
!> singular, and division by zero will occur if it is used
!> to solve a system of equations.
!>
INFO is an INTEGER and she is the vibe check of the whole operation:
= 0β successful exit π slay< 0β ifINFO = -i, the i-th argument had an illegal value π someone passed bad input> 0β ifINFO = i,U(i,i)is exactly zero. the factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it's used to solve a system of equations. π this is the "she finished the job but the job is cursed" ending
π¨ periodt: a positive INFO is not an error in the computation β the factorization completed β but U is singular and using it to solve a system of equations means division by zero. take that seriously, bestie.
π§ Author π§
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
absolute legends, each and every one π«Άπ
Definition at line 107 of file sgetrf.f. β
π Author π
Generated automatically by Doxygen for LAPACK from the source code. (she didn't write herself, a robot did, and honestly? still iconic π€β¨)
π and that's the whole page bestie β LAPACK, Version 3.12.0, SRC/sgetrf.f(3). go forth and factor, and remember: partial pivoting with row interchanges is not a personality trait but it is a lifestyle πππ
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms