CTPSV(3)
π CTPSV(3) β like, the LAPACK BLAS routine, bestie π
okay so this page lives in the LAPACK manual (Version 3.12.0, if we're being precise, and we are) and it's literally all about one little workhorse from BLAS/SRC/ctpsv.f. she's a Level 2 BLAS icon, no cap. let's get into it π«Ά
β¨ NAME β¨
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/BLAS/SRC/ctpsv.f β that's the file, that's the whole vibe. she's a .f file, she solves triangular systems, she's booked and busy π
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine CTPSV (uplo, trans, diag, n, ap, x, incx)β yep. that's her. that's the whole call.CTPSV.
π Function/Subroutine Documentation π
subroutine CTPSV (character uplo, character trans, character diag, integer &
n, complex, dimension(*) ap, complex, dimension(*) x, integer incx)
CTPSV. say it with me. CTPSV. iconic behavior honestly β
π¦ Purpose π¦
okay so here's the tea, straight from the source with the !> markup and everything:
!>
!> 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 like. she solves for x. she is not checking whether your matrix is singular or near-singular, bestie β that is not her job and she said what she said π you gotta do that test before you call her. do not come for her if your matrix was messy going in. π«Ά
π Parameters π
okay this is the part where we go one by one, and yes i'm gonna be thorough, because every single one of these matters:
UPLOβUPLO is 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βTRANS is CHARACTER*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βDIAG is CHARACTER*1. on entry,DIAGspecifies whether or not A is unit triangular, like: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,Nspecifies the order of the matrix A.Nmust be at least zero. (zero is allowed! she's chill like that. negative? no ma'am.)APβAP is COMPLEX array, dimension at least( ( n*( n + 1 ) )/2 ). this is the packed matrix and the packing order is very specific, so listen up:- before entry with
UPLO = '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 with
UPLO = '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 when
DIAG = 'U' or 'u', the diagonal elements of A are not referenced, but are assumed to be unity. so don't stress about what's sitting on that diagonal, she's not even looking at it π
- before entry with
XβX is COMPLEX array, dimension at least( 1 + ( n - 1 )*abs( INCX ) ). before entry, the incremented arrayXmust contain the n element right-hand side vectorb. on exit,Xis overwritten with the solution vectorx. she replaces it. no copy, no take-backs, that's the deal πINCXβINCX is INTEGER. on entry,INCXspecifies the increment for the elements ofX.INCXmust not be zero. fr fr. zero is not a vibe here.
β οΈ heads up bestie:INCXmust not be zero,Nmust be at least zero, and the singularity check? not included. that one's on you. π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
a whole collab. the avengers of numerical linear algebra, honestly π
π₯ 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) and Richard Hanson (Sandia National Labs). 1986!! she's vintage, she's a classic, she's been serving since before most of us existed and she still hits π β¨
β Definition β
Definition at line 143 of file ctpsv.f.
π· Author (the other one) π·
Generated automatically by Doxygen for LAPACK from the source code. not a human, just a robot doing her little documentation thing, and honestly? she ate. π
k that's the whole page, mwah π β this was LAPACK, Version 3.12.0, and the file is ctpsv.f(3), courtesy of our fave automatic doc generator. go solve your triangular systems responsibly, bestie. π¦π
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms