CLAVHE(3)
π CLAVHE(3) β the iconic LAPACK subroutine that's about to be your new bestie
Okay so bestie, grab your iced coffee because we're diving into the CLAVHE manual page from /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/LIN/clavhe.f. This is literally a Library Functions Manual situation and it's giving main character energy. No cap, this little file is iconic and we're gonna understand it together. π
β¨ SYNOPSIS β¨
So here's the whole vibe β CLAVHE lives in the Functions/Subroutines category, and the call looks like this:
subroutine CLAVHE (uplo, trans, diag, n, nrhs, a, lda, ipiv, b, ldb, info)
Yeah that's our girl CLAVHE, periodt. π
π¦ Function/Subroutine Documentation π¦
Okay so here's the full signature, and it's lowkey a lot of arguments but you're gonna slay:
subroutine CLAVHE (character uplo, character trans, character diag, integer
n, integer nrhs, complex, dimension( lda, * ) a, integer lda, integer,
dimension( * ) ipiv, complex, dimension( ldb, * ) b, integer ldb,
integer info)
Again β it's CLAVHE, our icon. π
πΈ Purpose πΈ
Okay bestie, listen up:
CLAVHEperforms one of the matrix-vector operationstext x := A*x or x := A^H*x,where x is an N element vector and A is one of the factors from the block U*D*U' or L*D*L' factorization computed by CHETRF.
And the trans tea β:
IfTRANS = 'N', multiplies by U or U * D (or L or L * D) IfTRANS = 'C', multiplies by U' or D * U' (or L' or D * L')
Literally so clean. Obsessed. π
β¨ Parameters β¨
Okay so here's where we get into the details β every single one, no skipping, because we don't gatekeep here. π
UPLOβ this is aCHARACTER*1, and it specifies whether the factor stored inAis upper or lower triangular.
= 'U': Upper triangular= 'L': Lower triangular
TRANSβCHARACTER*1, specifies the operation to be performed:
= 'N': x := A*x= 'C': x := A^H*x
DIAGβCHARACTER*1, this one's about whether or not the diagonal blocks are unit matrices. If the diagonal blocks are assumed to be unit, thenA = UorA = L, otherwiseA = U*DorA = L*D.
= 'U': Diagonal blocks are assumed to be unit matrices.= 'N': Diagonal blocks are assumed to be non-unit matrices.
NβINTEGER, the number of rows and columns of the matrixA. And the rule isN >= 0.NRHSβINTEGER, the number of right hand sides, i.e., the number of vectors x to be multiplied byA. AndNRHS >= 0.AβCOMPLEXarray, dimension(LDA,N). This is the block diagonal matrixDand the multipliers used to obtain the factorUorLas computed byCHETRF_ROOK. Stored as a 2-D triangular matrix, iykyk.LDAβINTEGER, the leading dimension of the arrayA. The requirement isLDA >= max(1,N).IPIVβINTEGERarray, dimension(N). This is the details of the interchanges and the block structure ofD, as determined byCHETRF. So here's the situation, bestie:
IfUPLO = 'U': - IfIPIV(k) > 0, then rows and columns k andIPIV(k)were interchanged andD(k,k)is a 1-by-1 diagonal block. (IfIPIV( k ) = k, no interchange was done). - IfIPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and-IPIV(k)were interchanged,D(k-1:k,k-1:k)is a 2-by-2 diagonal block.
IfUPLO = 'L': - IfIPIV(k) > 0, then rows and columns k andIPIV(k)were interchanged andD(k,k)is a 1-by-1 diagonal block. (IfIPIV( k ) = k, no interchange was done). - IfIPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and-IPIV(k)were interchanged,D(k:k+1,k:k+1)is a 2-by-2 diagonal block.
BβCOMPLEXarray, dimension(LDB,NRHS). On entry,BcontainsNRHSvectors of lengthN. On exit,Bis overwritten with the productA * B. So yeah she's doing double duty, iconic. πLDBβINTEGER, the leading dimension of the arrayB. Requirement:LDB >= max(1,N).INFOβINTEGER, the tea on how it went:
= 0: successful exit< 0: ifINFO = -k, the k-th argument had an illegal value
π Author π
So this page was brought to us by a whole squad of legends:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
And the definition is at line 151 of file clavhe.f. Slay. π
π Little Sign-Off π
Sooo this whole thing was generated automatically by Doxygen for LAPACK from the source code, and it's LAPACK Version 3.12.0. That's the vibe check β /home/abui...IN/clavhe.f(3). Byeee bestie, go multiply some matrices! π
β¨π«Ά
π¦ 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