BLAS/SRC/sgbmv.f(3)

πŸ’… BLAS/SRC/sgbmv.f(3) β€” Library Functions Manual

okay bestie, buckle up, we're looking at BLAS/SRC/sgbmv.f(3) from the Library Functions Manual β€” yes it's giving old-school Fortran, but hear me out, it's iconic πŸ’–


✨ SYNOPSIS ✨

Functions/Subroutines

subroutine sgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y,
    incy)

SGBMV πŸŽ€

πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

subroutine sgbmv (character trans, integer m, integer n, integer kl, integer
    ku, real alpha, real, dimension(lda,*) a, integer lda, real,
    dimension(*) x, integer incx, real beta, real, dimension(*) y, integer
    incy)

SGBMV

πŸ’– Purpose

!> !> SGBMV performs one of the matrix-vector operations !> !> y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !> !> where alpha and beta are scalars, x and y are vectors and A is an !> m by n band matrix, with kl sub-diagonals and ku super-diagonals. !>

so basically, bestie, SGBMV does one of those two matrix-vector glow-ups. alpha and beta are scalars, x and y are vectors, and A is an m by n band matrix with kl sub-diagonals and ku super-diagonals. band matrix era πŸ”₯


🌸 Parameters 🌸

TRANS

!> TRANS is CHARACTER*1 !> On entry, TRANS specifies the operation to be performed as !> follows: !> !> TRANS = 'N' or 'n' y := alpha*A*x + beta*y. !> !> TRANS = 'T' or 't' y := alpha*A**T*x + beta*y. !> !> TRANS = 'C' or 'c' y := alpha*A**T*x + beta*y. !>

TRANS is a CHARACTER*1 and it's literally the main character of this whole operation β€” it picks which one you get. 'N' or 'n' gives you y := alpha*A*x + beta*y. 'T' or 't' gives you y := alpha*A**T*x + beta*y. 'C' or 'c' gives you y := alpha*A**T*x + beta*y too. periodt πŸ’…

M

!> M is INTEGER !> On entry, M specifies the number of rows of the matrix A. !> M must be at least zero. !>

M is INTEGER and on entry it's the number of rows of the matrix A. M must be at least zero β€” no negatives, we don't do that here πŸ™ˆ

N

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

N is INTEGER, on entry it's the number of columns of the matrix A, and N must be at least zero. same energy, same rules 🫢

KL

!> KL is INTEGER !> On entry, KL specifies the number of sub-diagonals of the !> matrix A. KL must satisfy 0 .le. KL. !>

KL is INTEGER β€” the number of sub-diagonals of the matrix A. KL must satisfy 0 .le. KL. math checks out ✨

KU

!> KU is INTEGER !> On entry, KU specifies the number of super-diagonals of the !> matrix A. KU must satisfy 0 .le. KU. !>

KU is INTEGER β€” the number of super-diagonals of the matrix A. KU must satisfy 0 .le. KU. twin of KL but upward πŸ’«

ALPHA

!> ALPHA is REAL !> On entry, ALPHA specifies the scalar alpha. !>

ALPHA is REAL and on entry it's the scalar alpha. that's it, that's the whole vibe πŸŽ€

A

!> A is REAL array, dimension ( LDA, N ) !> Before entry, the leading ( kl + ku + 1 ) by n part of the !> array A must contain the matrix of coefficients, supplied !> column by column, with the leading diagonal of the matrix in !> row ( ku + 1 ) of the array, the first super-diagonal !> starting at position 2 in row ku, the first sub-diagonal !> starting at position 1 in row ( ku + 2 ), and so on. !> Elements in the array A that do not correspond to elements !> in the band matrix (such as the top left ku by ku triangle) !> are not referenced. !> The following program segment will transfer a band matrix !> from conventional full matrix storage to band storage: !> !> DO 20, J = 1, N !> K = KU + 1 - J !> DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL ) !> A( K + I, J ) = matrix( I, J ) !> 10 CONTINUE !> 20 CONTINUE !>

A is a REAL array, dimension ( LDA, N ). before entry, the leading ( kl + ku + 1 ) by n part of the array A must contain the matrix of coefficients β€” supplied column by column β€” with the leading diagonal of the matrix in row ( ku + 1 ) of the array, the first super-diagonal starting at position 2 in row ku, the first sub-diagonal starting at position 1 in row ( ku + 2 ), and so on, iykyk. πŸŒ€

elements in the array A that don't correspond to elements in the band matrix (like that top left ku by ku triangle) are not referenced β€” they're just there, living their lives, unbothered πŸ’€

and here's the iconic little program segment that transfers a band matrix from conventional full matrix storage to band storage:

DO 20, J = 1, N
   K = KU + 1 - J
   DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
      A( K + I, J ) = matrix( I, J )
10    CONTINUE
20 CONTINUE

copy it exactly bestie, don't freestyle 😭

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 !> ( kl + ku + 1 ). !>

LDA is INTEGER. on entry it's the first dimension of A as declared in the calling (sub) program, and LDA must be at least ( kl + ku + 1 ). respect the minimum 🫑

X

!> X is REAL array, dimension at least !> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' !> and at least !> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. !> Before entry, the incremented array X must contain the !> vector x. !>

X is a REAL array, dimension at least ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n', and at least ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. before entry, the incremented array X must contain the vector x. two moods, pick one πŸ’œ

INCX

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

INCX is INTEGER β€” the increment for the elements of X. INCX must not be zero. zero is not the vibe, fr fr 🚫

BETA

!> BETA is REAL !> On entry, BETA specifies the scalar beta. When BETA is !> supplied as zero then Y need not be set on input. !>

BETA is REAL and on entry it's the scalar beta. cute bonus: when BETA is supplied as zero, then Y need not be set on input β€” free pass ✨

Y

!> Y is REAL array, dimension at least !> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' !> and at least !> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. !> Before entry, the incremented array Y must contain the !> vector y. On exit, Y is overwritten by the updated vector y. !> If either m or n is zero, then Y not referenced and the function !> performs a quick return. !>

Y is a REAL array, dimension at least ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n', and at least ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. before entry, the incremented array Y must contain the vector y, and on exit Y is overwritten by the updated vector y β€” glow-up on the way out πŸ’…

heads up: if either m or n is zero, then Y not referenced and the function performs a quick return πŸƒβ€β™€οΈπŸ’¨

INCY

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

INCY is INTEGER β€” the increment for the elements of Y. INCY must not be zero either. keep those increments non-zero bestie 😀


πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

look at this stacked author list, absolute legends the lot of them 🫢


⭐ 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. !>
  • it's a Level 2 Blas routine 🧚
  • the vector and matrix arguments are not referenced when N = 0, or M = 0
  • 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 and it's still slaying, we love longevity πŸ‘‘

Definition at line 186 of file sgbmv.f.


🌈 Author (again, but make it Doxygen)

Generated automatically by Doxygen for LAPACK from the source code.


and that's the whole page, bestie, you ate it up, no cap πŸ’–βœ¨πŸŒΈπŸ¦‹

LAPACK β€” Version 3.12.0 πŸŽ€ BLAS/SRC/sgbmv.f(3) πŸŽ€ mwah, see you in the next manpage πŸ’‹
πŸ“¦ where this page comes from