/home/abui.../slatrs3.f(3)
β¨ slatrs3.f(3) β¨
okay bestie, welcome to the slatrs3.f(3) page from the Library Functions Manual. This is the LAPACK subroutine that solves triangular systems without letting everything overflow, and it is lowkey iconic. π¦
β¨ NAME β¨
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/slatrs3.f
β¨ SYNOPSIS β¨
Functions/Subroutines
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.
πΈ Function/Subroutine Documentation πΈ
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.
π‘ Purpose
okay so SLATRS3 solves one of these triangular systems, fr fr:
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βUPLOisCHARACTER*1. It says whether the matrixAis upper or lower triangular:= 'U'means upper triangular;= 'L'means lower triangular. πTRANSβTRANSisCHARACTER*1. It says what operation is applied toA:= 'N'means solveA * x = s*b(no transpose);= 'T'means solveA**T* x = s*b(transpose);= 'C'means solveA**T* x = s*b(conjugate transpose = transpose). π¦DIAGβDIAGisCHARACTER*1. It says whetherAis unit triangular or not:= 'N'means non-unit triangular;= 'U'means unit triangular. β¨NORMINβNORMINisCHARACTER*1. It says whetherCNORMhas been set or not:= 'Y'meansCNORMcontains the column norms on entry;= 'N'meansCNORMis not set on entry, and on exit the norms will be computed and stored inCNORM. πNβNisINTEGER. It's the order of the matrixA, andN >= 0. πNRHSβNRHSisINTEGER. It's the number of columns ofX, andNRHS >= 0. πΈAβAisREAL array, dimension (LDA,N). It's 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 be1. π«ΆLDAβLDAisINTEGER. It's the leading dimension of the arrayA, andLDA >= max (1,N). βXβXisREAL array, dimension (LDX,NRHS). On entry, it's the right hand sideBof the triangular system. On exit,Xis overwritten by the solution matrixX. π₯LDXβLDXisINTEGER. It's the leading dimension of the arrayX, andLDX >= max (1,N). πSCALEβSCALEisREAL 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βCNORMisREAL 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 the1-norm. IfNORMIN = 'N',CNORMis an output argument andCNORM(j)returns the1-norm of the offdiagonal part of thej-th column ofA. πWORKβWORKisREAL array, dimension (LWORK). On exit, ifINFO = 0,WORK(1)returns the optimal size ofWORK. π§LWORKβLWORKisINTEGER. The size rule is literally:LWORK >= 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 theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA. π
π Parameters π
INFOβINFOisINTEGER.= 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
The original page leaves this section empty, bestie β no extra notes here. That's the whole vibe. π
Definition at line 227 of file slatrs3.f.
π Author π
Generated automatically by Doxygen for LAPACK from the source code.
π cute sign-off: this page is from LAPACK, Version 3.12.0, and the page path is /home/abui.../slatrs3.f(3). That's the source/version info from the footer, bestie β slay. πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms