latrs3(3)
๐ latrs3(3) โ triangular solve with robust scaling, level 3 โจ
okay so bestie, this is latrs3(3), and it is literally the level-3 glow-up of triangular solves with robust scaling. iconic behavior. ๐
๐ธ NAME ๐ธ
latrs3 - latrs3: triangular solve with robust scaling, level 3 ๐ฆ
โจ SYNOPSIS โจ
๐ Functions ๐
subroutine clatrs3 (uplo, trans, diag, normin, n, nrhs, a, lda, x, ldx,
scale, cnorm, work, lwork, info)
CLATRS3โ solves a triangular system of equations with the scale factors set to prevent overflow. ๐
subroutine dlatrs3 (uplo, trans, diag, normin, n, nrhs, a, lda, x, ldx,
scale, cnorm, work, lwork, info)
DLATRS3โ solves 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)
SLATRS3โ solves a triangular system of equations with the scale factors set to prevent overflow. ๐
subroutine zlatrs3 (uplo, trans, diag, normin, n, nrhs, a, lda, x, ldx,
scale, cnorm, work, lwork, info)
ZLATRS3โ solves a triangular system of equations with the scale factors set to prevent overflow. ๐
๐ Detailed Description ๐
This page is about to get into the function docs, bestie. buckle up. ๐ข
๐งฎ Function Documentation ๐งฎ
๐ subroutine clatrs3 (character uplo, character trans, character diag, character normin, integer n, integer nrhs, complex, dimension( lda, * ) a, integer lda, complex, dimension( ldx, * ) x, integer ldx, real, dimension( * ) scale, real, dimension( * ) cnorm, real, dimension( * ) work, integer lwork, integer info)
subroutine clatrs3 (character uplo, character trans, character diag,
character normin, integer n, integer nrhs, complex, dimension( lda, * )
a, integer lda, complex, dimension( ldx, * ) x, integer ldx, real,
dimension( * ) scale, real, dimension( * ) cnorm, real, dimension( * )
work, integer lwork, integer info)
CLATRS3 solves a triangular system of equations with the scale factors set to prevent overflow. slay. ๐
๐ Purpose ๐
okay so CLATRS3 solves one of the triangular systems
A * X = B * diag(scale), A**T * X = B * diag(scale), or
A**H * X = B * diag(scale)
with scaling to prevent overflow. here A is an upper or lower triangular matrix, A**T denotes the transpose of A, and A**H denotes the conjugate 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. periodt. ๐ฅ
๐งธ Parameters ๐งธ
UPLOโUPLO is CHARACTER*1. specifies whether the matrix A is upper or lower triangular.= 'U':Upper triangular= 'L':Lower triangular
TRANSโTRANS is CHARACTER*1. specifies the operation applied to A.= 'N':SolveA * x = s*b(No transpose)= 'T':SolveA**T* x = s*b(Transpose)= 'C':SolveA**T* x = s*b(Conjugate transpose)
DIAGโDIAG is CHARACTER*1. specifies whether or not the matrix A is unit triangular.= 'N':Non-unit triangular= 'U':Unit triangular
NORMINโNORMIN is CHARACTER*1. specifies whether CNORM has 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โN is INTEGER. the order of the matrix A.N >= 0.NRHSโNRHS is INTEGER. the number of columns of X.NRHS >= 0.AโA is COMPLEX array, dimension (LDA,N). the triangular matrix A. ifUPLO = 'U', the leading n by n upper triangular part of the array A contains the upper triangular matrix, and the strictly lower triangular part of A is not referenced. ifUPLO = 'L', the leading n by n lower triangular part of the array A contains the lower triangular matrix, and the strictly upper triangular part of A is not referenced. ifDIAG = 'U', the diagonal elements of A are also not referenced and are assumed to be 1.LDAโLDA is INTEGER. the leading dimension of the array A.LDA >= max (1,N).XโX is COMPLEX array, dimension (LDX,NRHS). on entry, the right hand side B of the triangular system. on exit, X is overwritten by the solution matrix X.LDXโLDX is INTEGER. the leading dimension of the array X.LDX >= max (1,N).SCALEโSCALE is 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 matrix A is 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 is so badly scaled that the solution cannot be presented asx(:,k) * 1/s(k), thenx(:,k) = 0is returned. no cap, this one matters. ๐ซถCNORMโCNORM is REAL array, dimension (N). ifNORMIN = 'Y', CNORM is an input argument andCNORM(j)contains the norm of the off-diagonal part of the j-th column of A. 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', CNORM is an output argument andCNORM(j)returns the 1-norm of the offdiagonal part of the j-th column of A.WORKโWORK is REAL array, dimension (MAX(1,LWORK)). on exit, ifINFO = 0,WORK(1)returns the optimal size of WORK.LWORKโLWORK is INTEGER. the dimension of the array WORK. 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.ifLWORK = -1, then a workspace query is assumed; the routine only calculates the optimal dimensions of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.INFOโINFO is INTEGER= 0:successful exit< 0:ifINFO = -k, the k-th argument had an illegal value
๐ Author ๐
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ซ Further Details: ๐ซ
โญ Definition at line 233 of file clatrs3.f. โญ
๐ subroutine dlatrs3 (character uplo, character trans, character diag, character normin, integer n, integer nrhs, double precision, dimension( lda, * ) a, integer lda, double precision, dimension( ldx, * ) x, integer ldx, double precision, dimension( * ) scale, double precision, dimension( * ) cnorm, double precision, dimension( * ) work, integer lwork, integer info)
subroutine dlatrs3 (character uplo, character trans, character diag,
character normin, integer n, integer nrhs, double precision, dimension(
lda, * ) a, integer lda, double precision, dimension( ldx, * ) x,
integer ldx, double precision, dimension( * ) scale, double precision,
dimension( * ) cnorm, double precision, dimension( * ) work, integer
lwork, integer info)
DLATRS3 solves a triangular system of equations with the scale factors set to prevent overflow. ๐
๐ Purpose ๐
okay so DLATRS3 solves one of the 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. periodt. ๐ฅ
๐งธ Parameters ๐งธ
UPLOโUPLO is CHARACTER*1. specifies whether the matrix A is upper or lower triangular.= 'U':Upper triangular= 'L':Lower triangular
TRANSโTRANS is CHARACTER*1. specifies the operation applied to A.= 'N':SolveA * x = s*b(No transpose)= 'T':SolveA**T* x = s*b(Transpose)= 'C':SolveA**T* x = s*b(Conjugate transpose = Transpose)
DIAGโDIAG is CHARACTER*1. specifies whether or not the matrix A is unit triangular.= 'N':Non-unit triangular= 'U':Unit triangular
NORMINโNORMIN is CHARACTER*1. specifies whether CNORM has 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โN is INTEGER. the order of the matrix A.N >= 0.NRHSโNRHS is INTEGER. the number of columns of X.NRHS >= 0.AโAโDOUBLE PRECISION array, dimension (LDA,N). The triangular matrixAitself, bestie. IfUPLO = 'U', the leading n by n upper triangular part of the arrayAcontains the upper triangular matrix, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leading n by n lower triangular part ofAcontains the lower triangular matrix, and the strictly upper triangular part ofAis not referenced. And ifDIAG = 'U', the diagonal elements ofAare also not referenced and are assumed to be1. โจLDAโINTEGER. The leading dimension of the arrayA. Gotta beLDA >= max (1,N). No exceptions, periodt.XโDOUBLE PRECISION array, dimension (LDX,NRHS). On entry, this is the right hand sideBof the triangular system. On exit?Xgets overwritten by the solution matrixX๐ so like, copy it first if you needed the original, iykyk.LDXโINTEGER. The leading dimension of the arrayX.LDX >= max (1,N). Same energy asLDA, different letter ๐SCALEโDOUBLE PRECISION array, dimension (NRHS). The scaling factors(k)is for the triangular system
A * x(:,k) = s(k)*b(:,k) or A**T* x(:,k) = s(k)*b(:,k)
If SCALE = 0, the matrix A is singular or badly scaled ๐ญ If A(j,j) = 0 is encountered, a non-trivial vector x(:,k) that is an exact or approximate solution to A*x(:,k) = 0 is returned. And if the system is so badly scaled that the solution cannot be presented as x(:,k) * 1/s(k), then x(:,k) = 0 is returned. She's doing her best, okay ๐ซถ
CNORMโDOUBLE PRECISION array, dimension (N).
If NORMIN = 'Y', CNORM is an input argument and CNORM(j) contains the norm of the off-diagonal part of the j-th column of A. If TRANS = 'N', CNORM(j) must be greater than or equal to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j) must be greater than or equal to the 1-norm.
If NORMIN = 'N', CNORM is an output argument and CNORM(j) returns the 1-norm of the offdiagonal part of the j-th column of A. Cute little switch-up, love that for her ๐ธ
WORKโDOUBLE PRECISION array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimal size ofWORK.LWORKโINTEGER. The dimension of the arrayWORK.
If MIN(N,NRHS) = 0, LWORK >= 1, else
LWORK >= MAX(1, 2*NBA * MAX(NBA, MIN(NRHS, 32)), where
NBA = (N + NB - 1)/NB and NB is the optimal block size.
If LWORK = -1, then a workspace query is assumed ๐ the routine only calculates the optimal dimensions of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA. So like, it won't yell at you. Respect.
INFOโINTEGER.= 0: successful exit ๐< 0: ifINFO = -k, the k-th argument had an illegal value ๐
๐ Author ๐
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
๐ Further Details:
Definition at line 232 of file dlatrs3.f.
๐ slatrs3 โ the REAL one ๐
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. Single precision edition, she's just as iconic ๐
๐ Purpose ๐
SLATRS3 solves one of the triangular systemsfortran A * X = B * diag(scale) or A**T * X = B * diag(scale)with scaling to prevent overflow. HereAis an upper or lower triangular matrix,A**Tdenotes the transpose ofA.XandBare n by nrhs matrices andscaleis an nrhs element vector of scaling factors. A scaling factorscale(j)is usually less than or equal to1, chosen such thatX(:,j)is less than the overflow threshold. If the matrixAis singular (A(j,j) = 0for some j), then a non-trivial solution toA*X = 0is returned. If the system is so badly scaled that the solution cannot be represented as(1/scale(k))*X(:,k), thenx(:,k) = 0andscale(k)is returned. This is a BLAS-3 version of LATRS for solving several right hand sides simultaneously. ๐
๐ 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': SolveA * x = s*b(No transpose)= 'T': SolveA**T* x = s*b(Transpose)= 'C': SolveA**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':CNORMcontains the column norms on entry= 'N':CNORMis not set on entry. On exit, the norms will be computed and stored inCNORM.
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 leading n by n upper triangular part of the arrayAcontains the upper triangular matrix, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leading n by n lower 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 be1.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 system
A * x(:,k) = s(k)*b(:,k) or A**T* x(:,k) = s(k)*b(:,k)
If SCALE = 0, the matrix A is singular or badly scaled. If A(j,j) = 0 is encountered, a non-trivial vector x(:,k) that is an exact or approximate solution to A*x(:,k) = 0 is returned. If the system is so badly scaled that the solution cannot be presented as x(:,k) * 1/s(k), then x(:,k) = 0 is returned.
CNORMโREAL array, dimension (N).
If NORMIN = 'Y', CNORM is an input argument and CNORM(j) contains the norm of the off-diagonal part of the j-th column of A. If TRANS = 'N', CNORM(j) must be greater than or equal to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j) must be greater than or equal to the 1-norm.
If NORMIN = 'N', CNORM is an output argument and CNORM(j) returns the 1-norm of the offdiagonal part of the j-th column of A.
WORKโREAL array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. (Note the glow-up: this one says optimalLWORK, not optimal size ofWORKโ keep your eyes peeled, bestie ๐)LWORKโINTEGER. The dimension of the arrayWORK.
If MIN(N,NRHS) = 0, LWORK >= 1, else
LWORK >= MAX(1, 2*NBA * MAX(NBA, MIN(NRHS, 32)), where
NBA = (N + NB - 1)/NB and NB is the optimal block size.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal dimensions of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
INFOโINTEGER.= 0: successful exit< 0: ifINFO = -k, the k-th argument had an illegal value
๐ Author ๐
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
๐ Further Details:
Definition at line 231 of file slatrs3.f.
๐ zlatrs3 โ complex*16, double precision energy ๐
subroutine zlatrs3 (character uplo, character trans, character diag,
character normin, integer n, integer nrhs, complex*16, dimension( lda, *
) a, integer lda, complex*16, dimension( ldx, * ) x, integer ldx, double
precision, dimension( * ) scale, double precision, dimension( * ) cnorm,
double precision, dimension( * ) work, integer lwork, integer info)
ZLATRS3 solves a triangular system of equations with the scale factors set to prevent overflow. Complex maths, still zero overflow drama ๐ฆ
๐ซถ Purpose ๐ซถ
and this is exactly where ZLATRS3 starts explaining herselfโ
๐ Parameters ๐
Okay bestie, this is the whole cast of arguments โ every single one is doing something, so donโt skim. ๐
UPLOโCHARACTER*1. Tells us whetherAis upper or lower triangular.'U': Upper triangular'L': Lower triangular
TRANSโCHARACTER*1. Says which operation is being applied toA.'N': SolveA * x = s*b(No transpose)'T': SolveA**T* x = s*b(Transpose)'C': SolveA**T* x = s*b(Conjugate transpose)
DIAGโCHARACTER*1. IsAunit triangular or not? Thatโs the whole question.'N': Non-unit triangular'U': Unit triangular
NORMINโCHARACTER*1. HasCNORMalready been set, or are we filling it in now?'Y':CNORMcontains the column norms on entry'N':CNORMis not set on entry. On exit, the norms will be computed and stored inCNORM.
NโINTEGER. The order of the matrixA.N >= 0.NRHSโINTEGER. The number of columns ofX.NRHS >= 0.AโCOMPLEX*16 array, dimension (LDA,N). The triangular matrixA.- If
UPLO = 'U', the leadingnbynupper triangular part of the arrayAcontains the upper triangular matrix, and the strictly lower triangular part ofAis not referenced. - If
UPLO = 'L', the leadingnbynlower triangular part of the arrayAcontains the lower triangular matrix, and the strictly upper triangular part ofAis not referenced. - If
DIAG = 'U', the diagonal elements ofAare also not referenced and are assumed to be1.
- If
LDAโINTEGER. The leading dimension of the arrayA.LDA >= max (1,N).XโCOMPLEX*16 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โDOUBLE PRECISION 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 is so badly scaled that solution cannot be presented asx(:,k) * 1/s(k), thenx(:,k) = 0is returned.CNORMโDOUBLE PRECISION array, dimension (N).- If
NORMIN = '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 the1-norm. - If
NORMIN = 'N',CNORMis an output argument andCNORM(j)returns the1-norm of the offdiagonal part of thej-th column ofA.
- If
WORKโDOUBLE PRECISION array, dimension (LWORK). On exit, ifINFO = 0,WORK(1)returns the optimal size ofWORK.LWORKโINTEGER. The dimension of the arrayWORK.- If
MIN(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. - If
LWORK = -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.
- If
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 ๐
Definition at line 233 of file zlatrs3.f.
๐ง Author (the generated-by one) ๐ง
Generated automatically by Doxygen for LAPACK from the source code.
Thatโs the whole page, bestie ๐
โจ The footer tags this as LAPACK Version 3.12.0 and latrs3(3) โ no separate date printed on it, so weโre not inventing one ๐ซถ
๐ฆ 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