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)β CTPSVsubroutine dtpsv (uplo, trans, diag, n, ap, x, incx)β DTPSVsubroutine stpsv (uplo, trans, diag, n, ap, x, incx)β STPSVsubroutine 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β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 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β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.APβAPisCOMPLEXarray, 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βXisCOMPLEXarray, 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βINCXisINTEGER. 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.
!>
!> -- 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β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 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β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.APβAPisDOUBLE PRECISIONarray, 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βXisDOUBLE PRECISIONarray, 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βINCXisINTEGER. 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.
!>
!> -- 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β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 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β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.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 whenDIAG = 'U'or'u', the diagonal elements ofAare 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'βAis an upper triangular matrix.UPLO = 'L'or'l'βAis 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'βAis assumed to be unit triangular.DIAG = 'N'or'n'βAis 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 whenDIAG = 'U'or'u', the diagonal elements ofAare 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
- 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