tpsv(3)

🌸 tpsv(3) 🌸

okay so this is tpsv(3) from the Library Functions Manual, and bestie, it's a whole family of routines β€” ctpsv, dtpsv, stpsv, ztpsv β€” all doing the same iconic thing in different precisions. It's giving "one job, four outfits" πŸ’…


✨ NAME ✨

tpsv β€” tpsv: triangular matrix-vector solve

like, that's literally it. triangular matrix, vector, solve, slay πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

πŸ’– Functions πŸ’–

  • subroutine ctpsv (uplo, trans, diag, n, ap, x, incx) β€” CTPSV
  • subroutine dtpsv (uplo, trans, diag, n, ap, x, incx) β€” DTPSV
  • subroutine stpsv (uplo, trans, diag, n, ap, x, incx) β€” STPSV
  • subroutine ztpsv (uplo, trans, diag, n, ap, x, incx) β€” ZTPSV

🌈 Detailed Description 🌈

no cap, the whole thing is just the four function docs below. pick your precision, live your truth ✨


πŸ‘‘ Function Documentation πŸ‘‘

🫢 subroutine ctpsv (character uplo, character trans, character diag, integer n, complex, dimension(*) ap, complex, dimension(*) x, integer incx) 🫢

CTPSV

🌸 Purpose 🌸

!>
!> CTPSV  solves one of the systems of equations
!>
!>    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 matrix, supplied in packed form.
!>
!> No test for singularity or near-singularity is included in this
!> routine. Such tests must be performed before calling this routine.
!>

so real talk: it solves A*x = b, 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 matrix, supplied in packed form.

🚨 big mood warning: there is no test for singularity or near-singularity in this routine. none. zero. you gotta do those checks yourself before you call it, bestie. this thing will not warn you 😭

🌸 Parameters 🌸

  • UPLO β€” UPLO is CHARACTER*1. On entry, UPLO specifies whether the matrix is an upper or lower triangular matrix as follows:
    • UPLO = 'U' or 'u' β€” A is an upper triangular matrix.
    • UPLO = 'L' or 'l' β€” A is a lower triangular matrix.
  • TRANS β€” TRANS is CHARACTER*1. On entry, TRANS specifies the equations to be solved 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 β€” DIAG is CHARACTER*1. On entry, DIAG specifies whether or not A is unit triangular as follows:
    • DIAG = 'U' or 'u' β€” A is assumed to be unit triangular.
    • DIAG = 'N' or 'n' β€” A is not assumed to be unit triangular.
  • N β€” N is INTEGER. On entry, N specifies the order of the matrix A. N must be at least zero.
  • AP β€” AP is COMPLEX array, dimension at least ( ( n*( n + 1 ) )/2 ).

Before entry with UPLO = 'U' or 'u', the array AP must contain the upper triangular matrix packed sequentially, column by column, so that AP( 1 ) contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 ) respectively, and so on.

Before entry with UPLO = 'L' or 'l', the array AP must contain the lower triangular matrix packed sequentially, column by column, so that AP( 1 ) contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 ) respectively, and so on.

Note that when DIAG = 'U' or 'u', the diagonal elements of A are not referenced, but are assumed to be unity. πŸŽ€

  • X β€” X is COMPLEX array, dimension at least ( 1 + ( n - 1 )*abs( INCX ) ).

Before entry, the incremented array X must contain the n element right-hand side vector b. On exit, X is overwritten with the solution vector x. so like, your input becomes your output, no extra storage era πŸ’…

  • INCX β€” INCX is INTEGER. On entry, INCX specifies the increment for the elements of X. INCX must not be zero.

🫢 Author 🫢

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

⭐ 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.
!>

a Level 2 BLAS routine, written on 22-October-1986 by Jack Dongarra (Argonne National Lab), Jeremy Du Croz (Nag Central Office), Sven Hammarling (Nag Central Office) and Richard Hanson (Sandia National Labs). literal legends, we stan 🫑

Definition at line 143 of file ctpsv.f.


πŸ¦‹ subroutine dtpsv (character uplo, character trans, character diag, integer n, double precision, dimension(*) ap, double precision, dimension(*) x, integer incx) πŸ¦‹

DTPSV

🌸 Purpose 🌸

!>
!> DTPSV  solves one of the systems of equations
!>
!>    A*x = b,   or   A**T*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 matrix, supplied in packed form.
!>
!> No test for singularity or near-singularity is included in this
!> routine. Such tests must be performed before calling this routine.
!>

double precision twin of ctpsv πŸ’œ solves A*x = b or A**T*x = b, same deal: b and x are n element vectors, A is n by n unit or non-unit, upper or lower triangular, supplied in packed form.

🚨 again, no singularity check in here. do your own tests before calling, or you're on your own fr fr.

🌸 Parameters 🌸

  • UPLO β€” UPLO is CHARACTER*1. On entry, UPLO specifies whether the matrix is an upper or lower triangular matrix as follows:
    • UPLO = 'U' or 'u' β€” A is an upper triangular matrix.
    • UPLO = 'L' or 'l' β€” A is a lower triangular matrix.
  • TRANS β€” TRANS is CHARACTER*1. On entry, TRANS specifies the equations to be solved as follows:
    • TRANS = 'N' or 'n' β€” A*x = b.
    • TRANS = 'T' or 't' β€” A**T*x = b.
    • TRANS = 'C' or 'c' β€” A**T*x = b.
  • DIAG β€” DIAG is CHARACTER*1. On entry, DIAG specifies whether or not A is unit triangular as follows:
    • DIAG = 'U' or 'u' β€” A is assumed to be unit triangular.
    • DIAG = 'N' or 'n' β€” A is not assumed to be unit triangular.
  • N β€” N is INTEGER. On entry, N specifies the order of the matrix A. N must be at least zero.
  • AP β€” AP is DOUBLE PRECISION array, dimension at least ( ( n*( n + 1 ) )/2 ).

Before entry with UPLO = 'U' or 'u', the array AP must contain the upper triangular matrix packed sequentially, column by column, so that AP( 1 ) contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 ) respectively, and so on.

Before entry with UPLO = 'L' or 'l', the array AP must contain the lower triangular matrix packed sequentially, column by column, so that AP( 1 ) contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 ) respectively, and so on.

Note that when DIAG = 'U' or 'u', the diagonal elements of A are not referenced, but are assumed to be unity.

  • X β€” X is DOUBLE PRECISION array, dimension at least ( 1 + ( n - 1 )*abs( INCX ) ).

Before entry, the incremented array X must contain the n element right-hand side vector b. On exit, X is overwritten with the solution vector x.

  • INCX β€” INCX is INTEGER. On entry, INCX specifies the increment for the elements of X. INCX must not be zero.

🫢 Author 🫢

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

⭐ 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.
!>

Level 2 BLAS routine, written on 22-October-1986 by Jack Dongarra (Argonne National Lab), Jeremy Du Croz (Nag Central Office), Sven Hammarling (Nag Central Office), Richard Hanson (Sandia National Labs). same iconic lineup πŸ’–

Definition at line 143 of file dtpsv.f.


⭐ subroutine stpsv (character uplo, character trans, character diag, integer n, real, dimension(*) ap, real, dimension(*) x, integer incx) ⭐

STPSV

🌸 Purpose 🌸

!>
!> STPSV  solves one of the systems of equations
!>
!>    A*x = b,   or   A**T*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 matrix, supplied in packed form.
!>
!> No test for singularity or near-singularity is included in this
!> routine. Such tests must be performed before calling this routine.
!>

the single-precision one πŸ“ solves A*x = b or A**T*x = b β€” b and x are n element vectors, A is n by n unit or non-unit, upper or lower triangular, supplied in packed form.

🚨 same disclaimer, same energy: no singularity or near-singularity testing lives in here. run those tests before you call this routine, bestie 😭

🌸 Parameters 🌸

  • UPLO β€” UPLO is CHARACTER*1. On entry, UPLO specifies whether the matrix is an upper or lower triangular matrix as follows:
    • UPLO = 'U' or 'u' β€” A is an upper triangular matrix.
    • UPLO = 'L' or 'l' β€” A is a lower triangular matrix.
  • TRANS β€” TRANS is CHARACTER*1. On entry, TRANS specifies the equations to be solved as follows:
    • TRANS = 'N' or 'n' β€” A*x = b.
    • TRANS = 'T' or 't' β€” A**T*x = b.
    • TRANS = 'C' or 'c' β€” A**T*x = b.
  • DIAG β€” DIAG is CHARACTER*1. On entry, DIAG specifies whether or not A is unit triangular as follows:
    • DIAG = 'U' or 'u' β€” A is assumed to be unit triangular.
    • DIAG = 'N' or 'n' β€” A is not assumed to be unit triangular.
  • N β€” N is INTEGER. On entry, N specifies the order of the matrix A. N must be at least zero.
  • AP β€” (…and we're picking this back up in part 2, bestie πŸ’…)

AP 🌸

AP is a REAL array, dimension at least ( ( n*( n + 1 ) )/2 ).

Before entry with UPLO = 'U' or 'u', the array AP must contain the upper triangular matrix packed sequentially, column by column, so that AP( 1 ) contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 ) respectively, and so on.

Before entry with UPLO = 'L' or 'l', the array AP must contain the lower triangular matrix packed sequentially, column by column, so that AP( 1 ) contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 ) respectively, and so on.

Note that when DIAG = 'U' or 'u', the diagonal elements of A are not referenced, but are assumed to be unity. 🫢

X πŸ¦‹

X is REAL array, dimension at least ( 1 + ( n - 1 )*abs( INCX ) ).

Before entry, the incremented array X must contain the n element right-hand side vector b. On exit, X is overwritten with the solution vector x.

INCX ⭐

INCX is INTEGER. On entry, INCX specifies the increment for the elements of X. INCX must not be zero. 🚨

Author 🫢

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

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.

Definition at line 143 of file stpsv.f.


subroutine ztpsv πŸ’œ

subroutine ztpsv (character uplo, character trans, character diag, integer n, complex*16, dimension(*) ap, complex*16, dimension(*) x, integer incx)

ZTPSV β€” yes bestie, the COMPLEX*16 sibling is here. πŸ‘‘

Purpose 🎯

ZTPSV solves one of the systems of equations

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 matrix, supplied in packed form.

No test for singularity or near-singularity is included in this routine. Such tests must be performed before calling this routine. 😭

Parameters 🧚

UPLO

UPLO is CHARACTER*1. On entry, UPLO specifies whether the matrix is an upper or lower triangular matrix as follows:

  • UPLO = 'U' or 'u' β€” A is an upper triangular matrix.
  • UPLO = 'L' or 'l' β€” A is a lower triangular matrix.

TRANS

TRANS is CHARACTER*1. On entry, TRANS specifies the equations to be solved 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

DIAG is CHARACTER*1. On entry, DIAG specifies whether or not A is unit triangular as follows:

  • DIAG = 'U' or 'u' β€” A is assumed to be unit triangular.
  • DIAG = 'N' or 'n' β€” A is not assumed to be unit triangular.

N

N is INTEGER. On entry, N specifies the order of the matrix A. N must be at least zero.

AP

AP is COMPLEX*16 array, dimension at least ( ( n*( n + 1 ) )/2 ).

Before entry with UPLO = 'U' or 'u', the array AP must contain the upper triangular matrix packed sequentially, column by column, so that AP( 1 ) contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 ) respectively, and so on.

Before entry with UPLO = 'L' or 'l', the array AP must contain the lower triangular matrix packed sequentially, column by column, so that AP( 1 ) contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 ) respectively, and so on.

Note that when DIAG = 'U' or 'u', the diagonal elements of A are not referenced, but are assumed to be unity. πŸ’…

X

X is COMPLEX*16 array, dimension at least ( 1 + ( n - 1 )*abs( INCX ) ).

Before entry, the incremented array X must contain the n element right-hand side vector b. On exit, X is overwritten with the solution vector x.

INCX

INCX is INTEGER. On entry, INCX specifies the increment for the elements of X. INCX must not be zero. 🚨

Author 🫢

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

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.

Definition at line 143 of file ztpsv.f.


Author 🫢 (the meta one πŸ‘€)

Generated automatically by Doxygen for LAPACK from the source code.


Okay bestie, that’s the whole tea β˜•: LAPACK Version 3.12.0, footer vibe tpsv(3) β€” signed off with love and packed triangular realness. πŸ’–

πŸ“¦ where this page comes from