PDPTTRSV(l)

πŸ“¦ version 1.5, in ubuntu jammy

πŸ’– PDPTTRSV β€” bestie edition πŸ’–

okay so you know how we don't do boring manpage voice anymore? yeah. this is the LAPACK routine PDPTTRSV, manual section l, and it's from LAPACK version 1.5. let's get into it 🫢


✨ NAME ✨

PDPTTRSV β€” she solves a tridiagonal triangular system of linear equations, specifically this one:

A(1:N, JA:JA+N-1) * X = B(IB:IB+N-1, 1:NRHS)

periodt. that's the whole job description πŸ’…


🌸 SYNOPSIS 🌸

SUBROUTINE PDPTTRSV( UPLO, N, NRHS, D, E, JA, DESCA, B, IB, DESCB, AF,
                     LAF, WORK, LWORK, INFO )

    CHARACTER        UPLO

    INTEGER          IB, INFO, JA, LAF, LWORK, N, NRHS

    INTEGER          DESCA( * ), DESCB( * )

    DOUBLE           PRECISION AF( * ), B( * ), D( * ), E( * ), WORK( *
                     )

look at all those arguments, she's highkey booked and busy πŸ‘‘ (also yes, the declaration really does say DOUBLE PRECISION split across two lines like that. iconic formatting, no notes πŸ’€)


πŸ¦‹ PURPOSE πŸ¦‹

PDPTTRSV solves a tridiagonal triangular system of linear equations, and honestly there's a little choose your own adventure happening here, because it does either:

A(1:N, JA:JA+N-1) * X = B(IB:IB+N-1, 1:NRHS)

or

A(1:N, JA:JA+N-1)^T * X = B(IB:IB+N-1, 1:NRHS)

not me giving you options, bestie, that's literally the routine 🌈

so here's the lore: A(1:N, JA:JA+N-1) is a tridiagonal triangular matrix factor produced by the Cholesky factorization code PDPTTRF, and it gets stored in A(1:N,JA:JA+N-1) and in AF. two homes, one matrix, she contains multitudes ✨

the matrix living in A(1:N, JA:JA+N-1) is either upper or lower triangular according to UPLO β€” so UPLO is doing the vibe check on the shape, and you better respect its decision πŸ’…

and then whether you're solving with A(1:N, JA:JA+N-1) or with A(1:N, JA:JA+N-1)^T? that's dictated by the user by the parameter TRANS. yes, TRANS. it's not in the argument list up there, it's just out here living its truth. iykyk πŸ™ˆ

🚨 the important bit, do not skip: routine PDPTTRF MUST be called first. like, mandatory. non-negotiable. if you call PDPTTRSV without doing your PDPTTRF homework first, that's not slay, that's a setup for sadness 😭

that's the whole page, no cap. every argument, every *, every ^T, every capital letter in MUST β€” all accounted for πŸŽ€

LAPACK routine, version 1.5 β€” and this page is dated 12 May 1997. stan a legacy queen, she's been solving linear systems since before some of us were born πŸ’œβ­

πŸ“¦ where this page comes from