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)β CTPMVsubroutine dtpmv (uplo, trans, diag, n, ap, x, incx)β DTPMVsubroutine stpmv (uplo, trans, diag, n, ap, x, incx)β STPMVsubroutine 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,UPLOspecifies 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,TRANSspecifies 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,DIAGspecifies whether or notAis unit triangular:DIAG = 'U' or 'u'βAis assumed to be unit triangular.DIAG = 'N' or 'n'βAis not assumed to be unit triangular.
NβINTEGER. on entry,Nspecifies the order of the matrixA.Nmust be at least zero.APβCOMPLEXarray, dimension at least( ( n*( n + 1 ) )/2 ). before entry withUPLO = 'U' or 'u', the arrayAPmust contain the upper triangular matrix packed sequentially, column by column, so thatAP( 1 )containsa( 1, 1 ),AP( 2 )andAP( 3 )containa( 1, 2 )anda( 2, 2 )respectively, and so on. before entry withUPLO = 'L' or 'l', the arrayAPmust contain the lower triangular matrix packed sequentially, column by column, so thatAP( 1 )containsa( 1, 1 ),AP( 2 )andAP( 3 )containa( 2, 1 )anda( 3, 1 )respectively, and so on. note that whenDIAG = 'U' or 'u', the diagonal elements ofAare not referenced, but are assumed to be unity πXβCOMPLEXarray, dimension at least( 1 + ( n - 1 )*abs( INCX ) ). before entry, the incremented arrayXmust contain the n element vector x. on exit,Xis overwritten with the transformed vector x π₯INCXβINTEGER. on entry,INCXspecifies the increment for the elements ofX.INCXmust 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, orM = 0.
yes, it really does sayM = 0on a page that never defines anMπ 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,UPLOspecifies 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,TRANSspecifies 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,DIAGspecifies whether or notAis unit triangular:DIAG = 'U' or 'u'βAis assumed to be unit triangular.DIAG = 'N' or 'n'βAis not assumed to be unit triangular.
NβINTEGER. on entry,Nspecifies the order of the matrixA.Nmust be at least zero.APβDOUBLE PRECISIONarray, dimension at least( ( n*( n + 1 ) )/2 ). before entry withUPLO = 'U' or 'u', the arrayAPmust contain the upper triangular matrix packed sequentially, column by column, so thatAP( 1 )containsa( 1, 1 ),AP( 2 )andAP( 3 )containa( 1, 2 )anda( 2, 2 )respectively, and so on. before entry withUPLO = 'L' or 'l', the arrayAPmust contain the lower triangular matrix packed sequentially, column by column, so thatAP( 1 )containsa( 1, 1 ),AP( 2 )andAP( 3 )containa( 2, 1 )anda( 3, 1 )respectively, and so on. note that whenDIAG = 'U' or 'u', the diagonal elements ofAare not referenced, but are assumed to be unity.XβDOUBLE PRECISIONarray, dimension at least( 1 + ( n - 1 )*abs( INCX ) ). before entry, the incremented arrayXmust contain the n element vector x. on exit,Xis overwritten with the transformed vector x.INCXβINTEGER. on entry,INCXspecifies the increment for the elements ofX.INCXmust 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, orM = 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,UPLOspecifies 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,TRANSspecifies 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,DIAGspecifies whether or notAis unit triangular:DIAG = 'U' or 'u'βAis assumed to be unit triangular.DIAG = 'N' or 'n'βAis not assumed to be unit triangular.
NβINTEGER. on entry,Nspecifies the order of the matrixA.Nmust be at least zero.APβREALarray, dimension at least( ( n*( n + 1 ) )/2 ). before entry withUPLO = 'U' or 'u', the arrayAPmust contain the upper triangular matrix packed sequentially, column by column, so thatAP( 1 )containsa( 1, 1 ),AP( 2 )andAP( 3 )containa( 1, 2 )anda( 2, 2 )respectively, and so on. before entry withUPLO = 'L' or 'l', the arrayAPmust contain the lower triangular matrix packed sequentially, column by column, so thatAP( 1 )containsa( 1, 1 ),AP( 2 )andAP( 3 )containa( 2, 1 )anda( 3, 1 )respectively, and so on. note that whenDIAG = 'U' or 'u', the diagonal elements ofAare not referenced, but are assumed to be unity.XβXisREAL array, dimension at least( 1 + ( n - 1 )*abs( INCX ) ). Before entry, the incremented arrayXmust contain thenelement vectorx. On exit,Xis overwritten with the transformed vectorx. πINCXβINCXisINTEGER. On entry,INCXspecifies the increment for the elements ofX.INCXmust 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 whenN = 0, orM = 0-- Written on22-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βUPLOisCHARACTER*1. On entry,UPLOspecifies whether the matrix is an upper or lower triangular matrix as follows:UPLO = 'U' or 'u'βAis an upper triangular matrix.UPLO = 'L' or 'l'βAis a lower triangular matrix.
TRANSβTRANSisCHARACTER*1. On entry,TRANSspecifies 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βDIAGisCHARACTER*1. On entry,DIAGspecifies whether or notAis unit triangular as follows:DIAG = 'U' or 'u'βAis assumed to be unit triangular.DIAG = 'N' or 'n'βAis not assumed to be unit triangular.
NβNisINTEGER. On entry,Nspecifies the order of the matrixA.Nmust be at least zero. zero is allowed, bestie β it's giving empty-matrix representation.APβAPisCOMPLEX*16 array, dimension at least( ( n*( n + 1 ) )/2 ). Before entry withUPLO = 'U' or 'u', the arrayAPmust contain the upper triangular matrix packed sequentially, column by column, so thatAP( 1 )containsa( 1, 1 ),AP( 2 )andAP( 3 )containa( 1, 2 )anda( 2, 2 )respectively, and so on. Before entry withUPLO = 'L' or 'l', the arrayAPmust contain the lower triangular matrix packed sequentially, column by column, so thatAP( 1 )containsa( 1, 1 ),AP( 2 )andAP( 3 )containa( 2, 1 )anda( 3, 1 )respectively, and so on. Note that whenDIAG = 'U' or 'u', the diagonal elements ofAare not referenced, but are assumed to be unity. so do not come for the diagonal β it is literally not reading it. πXβXisCOMPLEX*16 array, dimension at least( 1 + ( n - 1 )*abs( INCX ) ). Before entry, the incremented arrayXmust contain thenelement vectorx. On exit,Xis overwritten with the transformed vectorx.INCXβINCXisINTEGER. On entry,INCXspecifies the increment for the elements ofX.INCXmust 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 whenN = 0, orM = 0-- Written on22-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
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms