SDTTRSV(l)
π SDTTRSV β bestie, we're solving tridiagonal systems tonight π
okay so real talk, this is a LAPACK routine (version 2.0, she's vintage but she ATE) called SDTTRSV, and she solves one of these systems of equations:
L * X = B, L**T * X = B, or L**H * X = B,
no cap, she does exactly what she says on the tin. periodt. π
β¨ NAME β¨
SDTTRSV β solve one of the systems of equations L * X = B, L**T * X = B, or L**H * X = B π«
like. she solves. that's her whole thing. main character energy fr fr π
πΈ SYNOPSIS πΈ
SUBROUTINE SDTTRSV( UPLO, TRANS, N, NRHS, DL, D, DU, B, LDB, INFO )
CHARACTER UPLO, TRANS
INTEGER INFO, LDB, N, NRHS
REAL B( LDB, * ), D( * ), DL( * ), DU( * )
look at her signature π she's serving, honestly. all those arguments lined up like a little friend group π«Ά
π¦ PURPOSE π¦
okay so SDTTRSV solves one of these systems of equations:
L * X = B, L**T * X = B, or L**H * X = B,
U * X = B, U**T * X = B, or U**H * X = B,
and the factors of that tridiagonal matrix A? yeah, those come straight from the LU factorization computed by SDTTRF. so she's not doing the whole thing alone, she's finishing what SDTTRF started. it's giving teamwork, it's giving collab, it's giving sisterhood β¨π
π ARGUMENTS π
okay bestie, let's go through the whole cast, one by one, nobody gets skipped:
UPLO(input)CHARACTER*1β specifies whether we're solving withLor withU. your call, queen πTRANS(input)CHARACTERβ specifies the form of the system of equations, and here are your options:= 'N': A * X = B(No transpose)= 'T': A**T * X = B(Transpose)= 'C': A**H * X = B(Conjugate transpose)
N(input)INTEGERβ the order of the matrixA. and the rule isN >= 0. no negative orders, we don't do that here πNRHS(input)INTEGERβ the number of right hand sides, aka the number of columns of the matrixB. constraint:NRHS >= 0. same energy, non-negative only πDL(input)COMPLEXarray, dimension(N-1)β the(n-1)multipliers that define the matrixLfrom the LU factorization ofA. she's the lower girlie πD(input)COMPLEXarray, dimension(N)β thendiagonal elements of the upper triangular matrixUfrom the LU factorization ofA. the main diagonal, the moment, the icon βDU(input)COMPLEXarray, dimension(N-1)β the(n-1)elements of the first superdiagonal ofU. sitting right above the diagonal, minding her business π§B(input/output)COMPLEXarray, dimension(LDB,NRHS)β on entry, she's the right hand side matrixB. on exit,Bgets overwritten by the solution matrixX. so yeah, she comes in as one thing and leaves as another. glow-up arc, honestly π β¨LDB(input)INTEGERβ the leading dimension of the arrayB, and you needLDB >= max(1,N). don't play with this one, she's strict π€INFO(output)INTEGERβ the receipts, the tea, the status report:= 0: successful exit π slay< 0: ifINFO = -i, thei-th argument had an illegal value π something you passed in was NOT it
π quick vibe check: thatINFO < 0situation means an argument was illegal, and it'll tell you which one by giving you-i. so if you see a negative number, count your arguments and figure out who's misbehaving. not me being the problem, not you being the problem, just an argument being messy π
and that's the whole page, bestie π«Ά this was SDTTRSV(l), a modified LAPACK routine, dated 12 May 1997 β yeah she's old enough to be your cool aunt and she still runs the tridiagonal solve game π no notes. iconic. bye π
ππΈ
π¦ where this page comes from
- ubuntu jammy: scalapack-doc 1.5-11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms