SDTTRSV(l)

πŸ“¦ version 1.5, in ubuntu jammy

πŸ’– 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 with L or with U. 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 matrix A. and the rule is N >= 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 matrix B. constraint: NRHS >= 0. same energy, non-negative only πŸ’–
  • DL (input) COMPLEX array, dimension (N-1) β€” the (n-1) multipliers that define the matrix L from the LU factorization of A. she's the lower girlie πŸ’œ
  • D (input) COMPLEX array, dimension (N) β€” the n diagonal elements of the upper triangular matrix U from the LU factorization of A. the main diagonal, the moment, the icon ⭐
  • DU (input) COMPLEX array, dimension (N-1) β€” the (n-1) elements of the first superdiagonal of U. sitting right above the diagonal, minding her business 🧚
  • B (input/output) COMPLEX array, dimension (LDB,NRHS) β€” on entry, she's the right hand side matrix B. on exit, B gets overwritten by the solution matrix X. so yeah, she comes in as one thing and leaves as another. glow-up arc, honestly πŸ’…βœ¨
  • LDB (input) INTEGER β€” the leading dimension of the array B, and you need LDB >= 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: if INFO = -i, the i-th argument had an illegal value 😭 something you passed in was NOT it

πŸ’€ quick vibe check: that INFO < 0 situation 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