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 eithermornis zero, thenYnot 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, orM = 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
- 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