STBMV(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’… STBMV(3) β€” like, the BLAS triangular band matrix-vector multiply, bestie

okay so real quick β€” this page lives in the Library Functions Manual, and it's literally the doc for /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/BLAS/SRC/stbmv.f. yes that whole entire path is the NAME. it's giving "the file is the moment". πŸŽ€


✨ SYNOPSIS ✨

Functions/Subroutines:

subroutine STBMV (uplo, trans, diag, n, k, a, lda, x, incx)

STBMV β€” that's her, that's the icon. πŸ‘‘

🌸 Function/Subroutine Documentation 🌸

subroutine STBMV (character uplo, character trans, character diag, integer n, integer k, real, dimension(lda,*) a, integer lda, real, dimension(*) x, integer incx)

STBMV. say it with me. 🫢

πŸ’– Purpose:

!>
!> STBMV  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 band matrix, with ( k + 1 ) diagonals.
!>

so basically: give her a triangular band matrix and a vector, and she gives you back either A*x or A**T*x. no cap, that's the whole gig. πŸ”₯


πŸ¦‹ 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.
!>

the vibe check for your matrix: 'U' / 'u' = upper triangular bestie, 'L' / 'l' = lower triangular bestie. pick one, she's not gonna guess. πŸ’…

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**T*x.
!>

'N' / 'n' = no transpose, just x := A*x. 'T' / 't' = transpose, x := A**T*x. 'C' / 'c' = also x := A**T*x (yes, for real, both of them land on the same thing β€” that's canon, don't come for me 😭).

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

'U' / 'u' = treat the diagonal as all 1s (unit triangular era ✨). 'N' / 'n' = nah, diagonal is whatever you actually stored.

N

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

N = the order of A. must be at least zero. yes, zero is allowed, she's inclusive. 🫢

K

!>          K is INTEGER
!>           On entry with UPLO = 'U' or 'u', K specifies the number of
!>           super-diagonals of the matrix A.
!>           On entry with UPLO = 'L' or 'l', K specifies the number of
!>           sub-diagonals of the matrix A.
!>           K must satisfy  0 .le. K.
!>

K = how many super-diagonals (when UPLO = 'U' / 'u') or sub-diagonals (when UPLO = 'L' / 'l') your matrix has. and K must satisfy 0 .le. K. β€” i.e. K is non-negative, periodt.

A

!>          A is REAL array, dimension ( LDA, N )
!>           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
!>           by n part of the array A must contain the upper triangular
!>           band part of the matrix of coefficients, supplied column by
!>           column, with the leading diagonal of the matrix in row
!>           ( k + 1 ) of the array, the first super-diagonal starting at
!>           position 2 in row k, and so on. The top left k by k triangle
!>           of the array A is not referenced.
!>           The following program segment will transfer an upper
!>           triangular band matrix from conventional full matrix storage
!>           to band storage:
!>
!>                 DO 20, J = 1, N
!>                    M = K + 1 - J
!>                    DO 10, I = MAX( 1, J - K ), J
!>                       A( M + I, J ) = matrix( I, J )
!>              10    CONTINUE
!>              20 CONTINUE
!>
!>           Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
!>           by n part of the array A must contain the lower triangular
!>           band part of the matrix of coefficients, supplied column by
!>           column, with the leading diagonal of the matrix in row 1 of
!>           the array, the first sub-diagonal starting at position 1 in
!>           row 2, and so on. The bottom right k by k triangle of the
!>           array A is not referenced.
!>           The following program segment will transfer a lower
!>           triangular band matrix from conventional full matrix storage
!>           to band storage:
!>
!>                 DO 20, J = 1, N
!>                    M = 1 - J
!>                    DO 10, I = J, MIN( N, J + K )
!>                       A( M + I, J ) = matrix( I, J )
!>              10    CONTINUE
!>              20 CONTINUE
!>
!>           Note that when DIAG = 'U' or 'u' the elements of the array A
!>           corresponding to the diagonal elements of the matrix are not
!>           referenced, but are assumed to be unity.
!>

okay this one's the big one, stay with me. A is a REAL array, dimension ( LDA, N ).

Upper case (UPLO = 'U' / 'u'): the leading ( k + 1 ) by n part of A holds the upper triangular band part, column by column, with the leading diagonal living in row ( k + 1 ), the first super-diagonal starting at position 2 in row k, and so on. the top left k by k triangle of A is not referenced β€” she simply doesn't look at it, it's not her business. πŸ™ˆ

Lower case (UPLO = 'L' / 'l'): the leading ( k + 1 ) by n part holds the lower triangular band part, column by column, with the leading diagonal in row 1, the first sub-diagonal starting at position 1 in row 2, and so on. the bottom right k by k triangle of A is not referenced either.

and the two code snippets above are literally how you scoop a full matrix into band storage β€” copy them exactly, they slay.

also: when DIAG = 'U' or 'u', the elements of A that correspond to the diagonal of the matrix are not referenced β€” they're just assumed to be unity. so don't stress about what's in there, she's not reading it. 🧚

LDA

!>          LDA is INTEGER
!>           On entry, LDA specifies the first dimension of A as declared
!>           in the calling (sub) program. LDA must be at least
!>           ( k + 1 ).
!>

LDA = the first dimension of A as declared in the calling (sub) program. must be at least ( k + 1 ). ✨

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

X is the vector, dimension at least ( 1 + ( n - 1 )*abs( INCX ) ). on entry it holds your n element vector x; on exit it's overwritten with the transformed x. so like… she ate, but your original x is gone. πŸ’€ back it up if you needed it.

INCX

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

INCX = the stride for the elements of X. INCX must not be zero β€” fr fr, do not pass zero, that's not a vibe. 🚫


πŸ‘‘ Author

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

the whole squad. iconic. 🌈


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

Level 2 BLAS routine, periodt. heads up: the vector and matrix arguments are not referenced when N = 0, or M = 0. and yes, she's been around since 22-October-1986 β€” Jack Dongarra (Argonne National Lab), Jeremy Du Croz (Nag Central Office), Sven Hammarling (Nag Central Office), and Richard Hanson (Sandia National Labs). legends only. πŸ‘‘


πŸ“ Definition

Definition at line 185 of file stbmv.f.

πŸŽ€ Author

Generated automatically by Doxygen for LAPACK from the source code. (yes the robot wrote it, she's just the messenger 😭)


and that's the whole page, bestie πŸ’œ β€” officially brought to you by LAPACK, Version 3.12.0, signed off from /home/abui...SRC/stbmv.f(3). mwah, go multiply something triangular. πŸ¦‹βœ¨

πŸ“¦ where this page comes from