SRC/slatrs3.f(3)
β¨ SRC/slatrs3.f β¨
okay so this page is straight out of the Library Functions Manual, and it's all about slatrs3 β the BLAS-3 bestie who solves triangular systems with scaling so nothing overflows. π
π¦ SYNOPSIS π¦
Functions/Subroutines
subroutine slatrs3βSLATRS3solves a triangular system of equations with the scale factors set to prevent overflow.
subroutine slatrs3 (uplo, trans, diag, normin, n, nrhs, a, lda, x, ldx,
scale, cnorm, work, lwork, info)
π Function/Subroutine Documentation π
subroutine slatrs3
subroutine slatrs3 (character uplo, character trans, character diag,
character normin, integer n, integer nrhs, real, dimension( lda, * ) a,
integer lda, real, dimension( ldx, * ) x, integer ldx, real, dimension(
* ) scale, real, dimension( * ) cnorm, real, dimension( * ) work,
integer lwork, integer info)
SLATRS3 solves a triangular system of equations with the scale factors set to prevent overflow. No cap. π«Ά
π― Purpose
okay so SLATRS3 solves one of these triangular systems:
A * X = B * diag(scale) or A**T * X = B * diag(scale)
with scaling to prevent overflow. Here A is an upper or lower triangular matrix, and A**T denotes the transpose of A. X and B are n by nrhs matrices, and scale is an nrhs element vector of scaling factors. A scaling factor scale(j) is usually less than or equal to 1, chosen such that X(:,j) is less than the overflow threshold. If the matrix A is singular (A(j,j) = 0 for some j), then a non-trivial solution to A*X = 0 is returned. If the system is so badly scaled that the solution cannot be represented as (1/scale(k))*X(:,k), then x(:,k) = 0 and scale(k) is returned.
This is a BLAS-3 version of LATRS for solving several right hand sides simultaneously. Literally iconic behavior. π
π§Έ Parameters
UPLOβCHARACTER*1. Specifies whether the matrixAis upper or lower triangular.= 'U': Upper triangular= 'L': Lower triangular
TRANSβCHARACTER*1. Specifies the operation applied toA.= 'N': Solve A * x = s*b (No transpose)= 'T': Solve A**T* x = s*b (Transpose)= 'C': Solve A**T* x = s*b (Conjugate transpose = Transpose)
DIAGβCHARACTER*1. Specifies whether or not the matrixAis unit triangular.= 'N': Non-unit triangular= 'U': Unit triangular
NORMINβCHARACTER*1. Specifies whetherCNORMhas been set or not.= 'Y': CNORM contains the column norms on entry= 'N': CNORM is not set on entry. On exit, the norms will be computed and stored in CNORM.
NβINTEGER. The order of the matrixA.N >= 0.NRHSβINTEGER. The number of columns ofX.NRHS >= 0.AβREAL array, dimension (LDA,N). The triangular matrixA. IfUPLO = 'U', the leadingnbynupper triangular part of the arrayAcontains the upper triangular matrix, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leadingnbynlower triangular part of the arrayAcontains the lower triangular matrix, and the strictly upper triangular part ofAis not referenced. IfDIAG = 'U', the diagonal elements ofAare also not referenced and are assumed to be 1.LDAβINTEGER. The leading dimension of the arrayA.LDA >= max (1,N).XβREAL array, dimension (LDX,NRHS). On entry, the right hand sideBof the triangular system. On exit,Xis overwritten by the solution matrixX.LDXβINTEGER. The leading dimension of the arrayX.LDX >= max (1,N).SCALEβREAL array, dimension (NRHS). The scaling factors(k)is for the triangular systemA * x(:,k) = s(k)*b(:,k)orA**T* x(:,k) = s(k)*b(:,k). IfSCALE = 0, the matrixAis singular or badly scaled. IfA(j,j) = 0is encountered, a non-trivial vectorx(:,k)that is an exact or approximate solution toA*x(:,k) = 0is returned. If the system so badly scaled that solution cannot be presented asx(:,k) * 1/s(k), thenx(:,k) = 0is returned.CNORMβREAL array, dimension (N). IfNORMIN = 'Y',CNORMis an input argument andCNORM(j)contains the norm of the off-diagonal part of thej-th column ofA. IfTRANS = 'N',CNORM(j)must be greater than or equal to the infinity-norm, and ifTRANS = 'T'or'C',CNORM(j)must be greater than or equal to the 1-norm. IfNORMIN = 'N',CNORMis an output argument andCNORM(j)returns the 1-norm of the offdiagonal part of thej-th column ofA.WORKβREAL array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβINTEGER. The dimension of the arrayWORK. IfMIN(N,NRHS) = 0,LWORK >= 1, elseLWORK >= MAX(1, 2*NBA * MAX(NBA, MIN(NRHS, 32)), where NBA = (N + NB - 1)/NB and NB is the optimal block size.
Heads up: IfLWORK = -1, then a workspace query is assumed; the routine only calculates the optimal dimensions of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA.
INFOβINTEGER.= 0: successful exit< 0: ifINFO = -k, thek-th argument had an illegal value
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Further Details:
(no extra details were listed here β just the heading, bestie π«)
π Definition at line 231 of file slatrs3.f.
Definition at line 231 of file slatrs3.f.
π€ Author
Generated automatically by Doxygen for LAPACK from the source code.
okay bestie, that's the whole SRC/slatrs3.f(3) page π The footer stamp says LAPACK Version 3.12.0 and the page is SRC/slatrs3.f(3). No extra date was shown on the page, so we're not inventing one β periodt. πβ¨
π¦ 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