BLAS/SRC/dgbmv.f(3)
π BLAS/SRC/dgbmv.f(3) β like, the Library Functions Manual energy β¨
okay bestie, so this is a page from the Library Functions Manual (yes, the actual manual name, she's fancy) and it's about a little Fortran icon called dgbmv. no cap, she does band matrix-vector math and she slays.
π NAME π
BLAS/SRC/dgbmv.f β that's it, that's the name. short, sweet, iconic. π«Ά
β¨ SYNOPSIS β¨
π¦ Functions/Subroutines π¦
subroutine dgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy)β the whole squad, assembled. this is the one.DGBMV, the main character.
subroutine dgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy)
π Function/Subroutine Documentation π
okay so, here's the full signature, exactly as she is, no edits, no vibes-based alterations:
subroutine dgbmv (character trans, integer m, integer n, integer kl, integer
ku, double precision alpha, double precision, dimension(lda,*) a,
integer lda, double precision, dimension(*) x, integer incx, double
precision beta, double precision, dimension(*) y, integer incy)
DGBMV π₯
π Purpose: π
DGBMV 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 literally: she multiplies a band matrix by a vector and mixes in scaled versions of y. that's the whole personality. π
πΈ 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*AT*x + beta*y. TRANS = 'C' or 'c' y := alpha*AT*x + beta*y.
picking 'N'/'n' means no transpose, bestie. 'T'/'t' and 'C'/'c' both give you the A**T version β lowercase counts too, she's not picky about case. π¦
M
M is INTEGER On entry, M specifies the number of rows of the matrix A. M must be at least zero.
rows. at least zero. no negatives, periodt. β¨
N
N is INTEGER On entry, N specifies the number of columns of the matrix A. N must be at least zero.
columns. also at least zero. keep the streak alive. π
KL
KL is INTEGER On entry, KL specifies the number of sub-diagonals of the matrix A. KL must satisfy 0 .le. KL.
how many sub-diagonals she's got going on. requirement: 0 .le. KL. π«Ά
KU
KU is INTEGER On entry, KU specifies the number of super-diagonals of the matrix A. KU must satisfy 0 .le. KU.
how many super-diagonals. requirement: 0 .le. KU. same energy, different diagonal direction. π
ALPHA
ALPHA is DOUBLE PRECISION. On entry, ALPHA specifies the scalar alpha.
just a scalar. she's DOUBLE PRECISION and she's doing her best. π
A
A is DOUBLE PRECISION 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
okay this one is the β¨loreβ¨. the leading ( kl + ku + 1 ) by n chunk holds the coefficients, packed column by column, and the diagonal placement is very specific β leading diagonal in row ( ku + 1 ), first super-diagonal starting at position 2 in row ku, first sub-diagonal starting at position 1 in row ( ku + 2 ), and so on. the bits of A that aren't in the band matrix (like that top-left ku by ku triangle, she's just filler π) are not referenced. the doctored loop up there is the exact glow-up 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
clone that, don't freestyle 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 ( kl + ku + 1 ).
leading dimension, as declared in the calling (sub) program. minimum: ( kl + ku + 1 ). don't skimp. π
X
X is DOUBLE PRECISION 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.
so the size flips depending on TRANS: ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n', and ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. before entry, the incremented array X has to contain the vector x. π₯
INCX
INCX is INTEGER On entry, INCX specifies the increment for the elements of X. INCX must not be zero.
stride for X. must not be zero. not a drill, bestie. π
BETA
BETA is DOUBLE PRECISION. On entry, BETA specifies the scalar beta. When BETA is supplied as zero then Y need not be set on input.
the other scalar. and lowkey the best part: when BETA is supplied as zero, Y need not be set on input. you get to skip that setup, iykyk. π
Y
Y is DOUBLE PRECISION 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.
note how Y mirrors X but swapped: ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n', ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. on entry it's the vector y, on exit it's overwritten by the updated vector y. and if either m or n is zero, Y is not referenced and the function performs a quick return β she leaves early, respectfully. π§
INCY
INCY is INTEGER On entry, INCY specifies the increment for the elements of Y. INCY must not be zero.
stride for Y. must not be zero either. two zero-stride crimes, zero tolerance. β
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
look at this collective. absolute icons, all 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.
she's a Level 2 Blas routine, and the vector and matrix arguments are not referenced when N = 0, or M = 0. written 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). vintage but still ate. π
π«Ά Definition π«Ά
Definition at line 186 of file dgbmv.f.
β Author (the meta one) β
Generated automatically by Doxygen for LAPACK from the source code.
that's the whole page, bestie, every last flag and caveat intact, nothing dropped, nothing invented π
LAPACK β Version 3.12.0 πΈ and the header up top was BLAS/SRC/dgbmv.f(3) from the Library Functions Manual, if you were wondering. mwah, go call dgbmv responsibly πβ¨π
π¦ 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