SRC/cla_geamv.f(3)
π SRC/cla_geamv.f(3) β Library Functions Manual, but make it make sense π«Ά
okay bestie, so this is a page from the Library Functions Manual and it's all about one lil Fortran subroutine. ngl it's giving "math that keeps your other math honest" energy. let's get into it β¨
πΈ NAME πΈ
SRC/cla_geamv.f β literally the whole name, that's it, that's the NAME section π
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine cla_geamv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy)β CLA_GEAMV computes a matrix-vector product using a general matrix to calculate error bounds. π
π Function/Subroutine Documentation π
π¦ subroutine cla_geamv (integer trans, integer m, integer n, real alpha, complex, dimension( lda, * ) a, integer lda, complex, dimension( * ) x, integer incx, real beta, real, dimension( * ) y, integer incy)
CLA_GEAMV computes a matrix-vector product using a general matrix to calculate error bounds. π₯
π Purpose:
ok so here's the tea, written exactly as the source says it:
!>
!> CLA_GEAMV performs one of the matrix-vector operations
!>
!> y := alpha*abs(A)*abs(x) + beta*abs(y),
!> or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
!>
!> where alpha and beta are scalars, x and y are vectors and A is an
!> m by n matrix.
!>
!> This function is primarily used in calculating error bounds.
!> To protect against underflow during evaluation, components in
!> the resulting vector are perturbed away from zero by (N+1)
!> times the underflow threshold. To prevent unnecessarily large
!> errors for block-structure embedded in general matrices,
!> zero components are not perturbed. A zero
!> entry is considered if all multiplications involved
!> in computing that entry have at least one zero multiplicand.
!>
translation for the girlies who don't speak matrix: it's a workhorse that exists mainly to compute error bounds. and because floating point loves to be dramatic π, it nudges components of the result away from zero by (N+1) times the underflow threshold so stuff doesn't just collapse to nothing. but it's not out here wrecking zeros β any zero component stays zero. no cap, that's the whole vibe check. π
π Parameters
TRANS
!> TRANS is INTEGER
!> On entry, TRANS specifies the operation to be performed as
!> follows:
!>
!> BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
!> BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
!> BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
!>
!> Unchanged on exit.
!>
so TRANS is the INTEGER that picks which of the three operations you want β BLAS_NO_TRANS, BLAS_TRANS, or BLAS_CONJ_TRANS β each one giving you the formula listed right there. and hey, it stays unchanged on exit. iconic behavior honestly. β¨
M
!> M is INTEGER
!> On entry, M specifies the number of rows of the matrix A.
!> M must be at least zero.
!> Unchanged on exit.
!>
M = number of rows of A. and it must be at least zero, we do not do negative rows here bestie. unchanged on exit, obviously. π
N
!> N is INTEGER
!> On entry, N specifies the number of columns of the matrix A.
!> N must be at least zero.
!> Unchanged on exit.
!>
N = number of columns of A. also must be at least zero. also unchanged on exit. symmetry slay. π
ALPHA
!> ALPHA is REAL
!> On entry, ALPHA specifies the scalar alpha.
!> Unchanged on exit.
!>
ALPHA is REAL, it's your scalar alpha, it does not get touched. periodt. β
A
!> A is COMPLEX array, dimension (LDA,n)
!> Before entry, the leading m by n part of the array A must
!> contain the matrix of coefficients.
!> Unchanged on exit.
!>
A is a COMPLEX array of dimension (LDA,n). before you call, the leading m by n part has to already hold your matrix of coefficients. and yeah β unchanged on exit. π¦
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
!> max( 1, m ).
!> Unchanged on exit.
!>
LDA is the first dimension of A as declared in the calling (sub) program. the rule: LDA must be at least max( 1, m ). don't skip that check, it's literally non-negotiable π
X
!> X is COMPLEX array, dimension
!> ( 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.
!> Unchanged on exit.
!>
X is COMPLEX with dimension ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n', and at least ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. before entry it's gotta hold your vector x. unchanged on exit β love that for it. π
INCX
!> INCX is INTEGER
!> On entry, INCX specifies the increment for the elements of
!> X. INCX must not be zero.
!> Unchanged on exit.
!>
INCX = the increment for the elements of X. and INCX must not be zero β zero stride is a no β. unchanged on exit. π
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.
!> Unchanged on exit.
!>
BETA is REAL, your scalar beta. cute bonus fact: if you hand it BETA as zero, then Y need not be set on input β free pass β¨. unchanged on exit.
Y
!> Y is REAL array, dimension
!> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
!> and at least
!> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
!> Before entry with BETA non-zero, 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 with dimension ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n', and at least ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. before entry with BETA non-zero, it must contain the vector y. and heads up β on exit, Y gets overwritten by the updated y (main character move tbh). also: if either m or n is zero, then Y is not referenced and the function does a quick return. π
INCY
!> INCY is INTEGER
!> On entry, INCY specifies the increment for the elements of
!> Y. INCY must not be zero.
!> Unchanged on exit.
!>
INCY = the increment for the elements of Y. INCY must not be zero either, bestie, same rule. unchanged on exit. π§
!> Level 2 Blas routine.
!>
oh and it's a Level 2 BLAS routine β that's the lore. π
πΈ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 175 of file cla_geamv.f. (iykyk π)
π Author (the other one)
Generated automatically by Doxygen for LAPACK from the source code. so technically the author is a robot. we stan a hardworking robot. π€π
ok that's genuinely the whole page, nothing skipped, you're welcome π«Ά
sign-off time bestie: this gorgeous little page came from LAPACK, Version 3.12.0, filed under SRC/cla_geamv.f(3) β ily, go perturb some zeros (except the actual zeros, don't touch those) ππΈβ¨
π¦ 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