tpmv(3)

okay bestie, pull up a chair πŸ’– this is tpmv(3) out of the Library Functions Manual β€” the packed triangular matrix-vector multiply page β€” and honestly she's a whole era. four subroutines, one job, and the lore goes back to 1986. no cap. ✨

🌸 NAME 🌸

tpmv β€” tpmv: triangular matrix-vector multiply

like, that's the entire name. the family name is tpmv and every precision-flavoured sibling shows up below πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

✨ Functions ✨

  • subroutine ctpmv (uplo, trans, diag, n, ap, x, incx) β€” CTPMV
  • subroutine dtpmv (uplo, trans, diag, n, ap, x, incx) β€” DTPMV
  • subroutine stpmv (uplo, trans, diag, n, ap, x, incx) β€” STPMV
  • subroutine ztpmv (uplo, trans, diag, n, ap, x, incx) β€” ZTPMV

that's it, that's the roster 🫢 same argument list every time, only the element type changes. iconic behaviour ngl.


πŸ’œ Detailed Description πŸ’œ

okay so there's basically no extra lore here β€” the detailed description is just the function docs that follow 😭 each routine does the same thing in a different precision, and the docs below are basically the whole personality of this page. keep scrolling, bestie, it's worth it.


πŸ‘‘ Function Documentation πŸ‘‘

πŸŽ€ subroutine ctpmv

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

CTPMV β€” the complex single-precision one. she's the main character of this section πŸ’…

⭐ Purpose ⭐

CTPMV performs one of the matrix-vector operations

x := A*x,   or   x := A**T*x,   or   x := A**H*x,

where x is an n element vector and A is an n by n unit, or non-unit, upper or lower triangular matrix, supplied in packed form.

πŸ¦‹ Parameters πŸ¦‹

  • UPLO β€” CHARACTER*1. on entry, UPLO specifies whether the matrix is an upper or lower triangular matrix, like so:
    • UPLO = 'U' or 'u' β€” A is an upper triangular matrix.
    • UPLO = 'L' or 'l' β€” A is a lower triangular matrix.
  • TRANS β€” CHARACTER*1. on entry, TRANS specifies the operation to be performed, and you already know it's a vibe check moment:
    • TRANS = 'N' or 'n' β€” x := A*x.
    • TRANS = 'T' or 't' β€” x := A**T*x.
    • TRANS = 'C' or 'c' β€” x := A**H*x.
  • DIAG β€” CHARACTER*1. on entry, DIAG specifies whether or not A is unit triangular:
    • DIAG = 'U' or 'u' β€” A is assumed to be unit triangular.
    • DIAG = 'N' or 'n' β€” A is not assumed to be unit triangular.
  • N β€” INTEGER. on entry, N specifies the order of the matrix A. N must be at least zero.
  • AP β€” 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 β€” COMPLEX array, dimension at least ( 1 + ( n - 1 )*abs( INCX ) ). before entry, the incremented array X must contain the n element vector x. on exit, X is overwritten with the transformed vector x πŸ”₯
  • INCX β€” INTEGER. on entry, INCX specifies the increment for the elements of X. INCX must not be zero β€” that's a hard no, bestie πŸ’€

🌟 Author 🌟

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

🌈 Further Details 🌈

  • Level 2 Blas routine.
  • the vector and matrix arguments are not referenced when N = 0, or M = 0.
yes, it really does say M = 0 on a page that never defines an M πŸ’€ we don't make the rules, we just transcribe them faithfully.
-- 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.

so, vintage. 1986. the girls were doing packed triangular multiplies before it was cool πŸŽ€

Definition at line 141 of file ctpmv.f.


πŸŽ€ subroutine dtpmv

subroutine dtpmv (character uplo, character trans, character diag, integer n, double precision, dimension(*) ap, double precision, dimension(*) x, integer incx)

DTPMV β€” same energy, double precision edition. she's giving "I'm the responsible one" ✨

⭐ Purpose ⭐

DTPMV performs one of the matrix-vector operations

x := A*x,   or   x := A**T*x,

where x is an n element vector and A is an n by n unit, or non-unit, upper or lower triangular matrix, supplied in packed form.

heads up: no A**H here β€” real numbers don't need a conjugate transpose, so she simply doesn't offer one πŸ’…

πŸ¦‹ Parameters πŸ¦‹

  • UPLO β€” CHARACTER*1. on entry, UPLO specifies whether the matrix is an upper or lower triangular matrix:
    • UPLO = 'U' or 'u' β€” A is an upper triangular matrix.
    • UPLO = 'L' or 'l' β€” A is a lower triangular matrix.
  • TRANS β€” CHARACTER*1. on entry, TRANS specifies the operation to be performed:
    • TRANS = 'N' or 'n' β€” x := A*x.
    • TRANS = 'T' or 't' β€” x := A**T*x.
    • TRANS = 'C' or 'c' β€” x := A**T*x.
  • DIAG β€” CHARACTER*1. on entry, DIAG specifies whether or not A is unit triangular:
    • DIAG = 'U' or 'u' β€” A is assumed to be unit triangular.
    • DIAG = 'N' or 'n' β€” A is not assumed to be unit triangular.
  • N β€” INTEGER. on entry, N specifies the order of the matrix A. N must be at least zero.
  • AP β€” 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 β€” DOUBLE PRECISION array, dimension at least ( 1 + ( n - 1 )*abs( INCX ) ). before entry, the incremented array X must contain the n element vector x. on exit, X is overwritten with the transformed vector x.
  • INCX β€” 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.
  • the vector and matrix arguments are not referenced when N = 0, or M = 0.
-- 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 141 of file dtpmv.f.


πŸŽ€ subroutine stpmv

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

STPMV β€” the real single-precision sibling. lowkey the most relatable one, honestly πŸ“

⭐ Purpose ⭐

STPMV performs one of the matrix-vector operations

x := A*x,   or   x := A**T*x,

where x is an n element vector and A is an n by n unit, or non-unit, upper or lower triangular matrix, supplied in packed form.

πŸ¦‹ Parameters πŸ¦‹

  • UPLO β€” CHARACTER*1. on entry, UPLO specifies whether the matrix is an upper or lower triangular matrix:
    • UPLO = 'U' or 'u' β€” A is an upper triangular matrix.
    • UPLO = 'L' or 'l' β€” A is a lower triangular matrix.
  • TRANS β€” CHARACTER*1. on entry, TRANS specifies the operation to be performed:
    • TRANS = 'N' or 'n' β€” x := A*x.
    • TRANS = 'T' or 't' β€” x := A**T*x.
    • TRANS = 'C' or 'c' β€” x := A**T*x.
  • DIAG β€” CHARACTER*1. on entry, DIAG specifies whether or not A is unit triangular:
    • DIAG = 'U' or 'u' β€” A is assumed to be unit triangular.
    • DIAG = 'N' or 'n' β€” A is not assumed to be unit triangular.
  • N β€” INTEGER. on entry, N specifies the order of the matrix A. N must be at least zero.
  • AP β€” 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 vector x. On exit, X is overwritten with the transformed vector x. πŸ’–
  • INCX β€” INCX is INTEGER. On entry, INCX specifies the increment for the elements of X. INCX must not be zero. no cap, zero is not the vibe here β€” do not test it.

πŸ‘‘ Author πŸ‘‘

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

🌈 Further Details: 🌈

Level 2 Blas routine. The vector and matrix arguments are not referenced when N = 0, or M = 0 -- 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 141 of file stpmv.f.


πŸ¦‹ ztpmv β€” the COMPLEX*16 bestie enters πŸ¦‹

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

ZTPMV

✨ Purpose: ✨

ZTPMV performs one of the matrix-vector operations

x := A*x,   or   x := A**T*x,   or   x := A**H*x,

where x is an n element vector and A is an n by n unit, or non-unit, upper or lower triangular matrix, supplied in packed form. packed form is the whole aesthetic, okay? 🫢

πŸŽ€ 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 operation to be performed as follows:
    • TRANS = 'N' or 'n' β€” x := A*x.
    • TRANS = 'T' or 't' β€” x := A**T*x.
    • TRANS = 'C' or 'c' β€” x := A**H*x.
  • 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. zero is allowed, bestie β€” it's giving empty-matrix representation.
  • 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. so do not come for the diagonal β€” it is literally not reading it. πŸ’…
  • 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 vector x. On exit, X is overwritten with the transformed vector x.
  • INCX β€” INCX is INTEGER. On entry, INCX specifies the increment for the elements of X. INCX must not be zero. again: not zero. zero is banned. periodt.

πŸ’œ Author πŸ’œ

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

🌸 Further Details: 🌸

Level 2 Blas routine. The vector and matrix arguments are not referenced when N = 0, or M = 0 -- 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 141 of file ztpmv.f.

🫢 Author 🫢

Generated automatically by Doxygen for LAPACK from the source code.


πŸ’–βœ¨ and that's the whole tpmv(3) glow-up! This page is serving LAPACK Version 3.12.0, and the footer did not hand us a date β€” so no date, just source-code royalty and main-character energy. Slay your triangular packed matrix-vector products, bestie! πŸ«ΆπŸ’…

πŸ“¦ where this page comes from