BLAS/SRC/ctbsv.f(3)
π BLAS/SRC/ctbsv.f π
okay bestie, this is the ctbsv page from the LAPACK manual (that's the manual name, love that for us) β it lives at BLAS/SRC/ctbsv.f. it's a Level 2 BLAS routine and it's honestly so real for what it does. let's get into it π«Ά
β¨ NAME β¨
BLAS/SRC/ctbsv.f β no cap, that's literally the name, the file is the name, we love a minimalist icon π
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine ctbsv (uplo, trans, diag, n, k, a, lda, x, incx)β this isCTBSV, the moment, the legend π
π¦ Function/Subroutine Documentation π¦
subroutine ctbsv (character uplo, character trans, character diag, integer
n, integer k, complex, dimension(lda,*) a, integer lda, complex,
dimension(*) x, integer incx)
CTBSV β say it with me. iconic.
π Purpose π
so CTBSV solves one of these systems of equations, pick your fighter:
A*x = b, or A**T*x = b, or A**H*x = b,
where b and x are n element vectors and A is an n by n unit, or non-unit, upper or lower triangular band matrix, with ( k + 1 ) diagonals. she's a band matrix, she's triangular, she's booked and busy π
β οΈ real talk bestie, this part is important: there is NO test for singularity or near-singularity included in this routine. none. zero. not a vibe check to be found. such tests must be performed before calling this routine. so do your homework first, okay? π
π§ Parameters π§
UPLOβUPLOisCHARACTER*1. on entry,UPLOspecifies whether the matrix is an upper or lower triangular matrix, like this:UPLO = 'U' or 'u'βAis an upper triangular matrix.UPLO = 'L' or 'l'βAis a lower triangular matrix.
TRANSβTRANSisCHARACTER*1. on entry,TRANSspecifies which equations we're solving, as follows:TRANS = 'N' or 'n'βA*x = b.TRANS = 'T' or 't'βA**T*x = b.TRANS = 'C' or 'c'βA**H*x = b.
DIAGβDIAGisCHARACTER*1. on entry,DIAGspecifies whether or notAis unit triangular, like this:DIAG = 'U' or 'u'βAis assumed to be unit triangular.DIAG = 'N' or 'n'βAis not assumed to be unit triangular.
NβNisINTEGER. on entry,Nspecifies the order of the matrixA.Nmust be at least zero. (yes bestie, zero is allowed, we respect the boundary π«Ά)KβKisINTEGER. on entry withUPLO = 'U' or 'u',Kspecifies the number of super-diagonals of the matrixA. on entry withUPLO = 'L' or 'l',Kspecifies the number of sub-diagonals of the matrixA.Kmust satisfy0 .le. K.AβAisCOMPLEX array, dimension ( LDA, N ).- before entry with
UPLO = 'U' or 'u', the leading( k + 1 )bynpart of the arrayAmust contain the upper triangular band part of the matrix of coefficients, supplied column by column, with the leading diagonal of the matrix in row( k + 1 )of the array, the first super-diagonal starting at position 2 in rowk, and so on. the top leftkbyktriangle of the arrayAis not referenced. π - the following program segment will transfer an upper triangular band matrix from conventional full matrix storage to band storage:
- before entry with
DO 20, J = 1, N
M = K + 1 - J
DO 10, I = MAX( 1, J - K ), J
A( M + I, J ) = matrix( I, J )
10 CONTINUE
20 CONTINUE
- before entry with
UPLO = 'L' or 'l', the leading( k + 1 )bynpart of the arrayAmust contain the lower triangular band part of the matrix of coefficients, supplied column by column, with the leading diagonal of the matrix in row 1 of the array, the first sub-diagonal starting at position 1 in row 2, and so on. the bottom rightkbyktriangle of the arrayAis not referenced. - the following program segment will transfer a lower triangular band matrix from conventional full matrix storage to band storage:
DO 20, J = 1, N
M = 1 - J
DO 10, I = J, MIN( N, J + K )
A( M + I, J ) = matrix( I, J )
10 CONTINUE
20 CONTINUE
- note that when
DIAG = 'U' or 'u'the elements of the arrayAcorresponding to the diagonal elements of the matrix are not referenced, but are assumed to be unity. so like, they're there but we're not looking at them, minding our business π
LDAβLDAisINTEGER. on entry,LDAspecifies the first dimension ofAas declared in the calling (sub) program.LDAmust be at least( k + 1 ).XβXisCOMPLEX array, dimension at least ( 1 + ( n - 1 )*abs( INCX ) ). before entry, the incremented arrayXmust contain thenelement right-hand side vectorb. on exit,Xis overwritten with the solution vectorx. she gets a glow-up mid-call, obsessed β¨INCXβINCXisINTEGER. on entry,INCXspecifies the increment for the elements ofX.INCXmust not be zero. seriously. not zero. π«
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
the whole squad showed up, periodt π
π Further Details π
- Level 2 Blas routine.
-- Written on 22-October-1986.- Jack Dongarra, Argonne National Lab.
- Jeremy Du Croz, Nag Central Office.
- Sven Hammarling, Nag Central Office.
- Richard Hanson, Sandia National Labs.
1986?? they were doing this before most of us were even a thought and it still slaps. main character energy fr fr π₯
π Definition π
Definition at line 188 of file ctbsv.f.
π« Author π«
Generated automatically by Doxygen for LAPACK from the source code. (not me writing this by hand, the machine did it, but I gave it the sparkle β¨)
and that's the whole page bestie, you ate it up π
cute lil sign-off: this was Version 3.12.0, dated Tue Nov 28 2023 12:08:41, from BLAS/SRC/ctbsv.f(3). love you, bye πππ¦
π¦ where this page comes from
- centos-stream 10: blas 3.12.0-7.el10 Β· BSD-3-Clause-Open-MPI
- fedora 43: blas 3.12.0-10.fc43 Β· BSD-3-Clause-Open-MPI
- fedora 43: blas 3.12.0-10.fc43 Β· BSD-3-Clause-Open-MPI
- fedora 44: blas 3.12.0-11.fc44 Β· BSD-3-Clause-Open-MPI
- fedora 44: blas 3.12.0-11.fc44 Β· BSD-3-Clause-Open-MPI
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms