la_geamv(3)
π
la_geamv(3) β the group-chat guide π
okay so bestie, welcome to la_geamv(3) from the Library Functions Manual. This is the one about matrix-vector multiply with |A| * |x|, general flavored. Four routines, all doing the same iconic thing in different precisions. Let's get into it π«Ά
β¨ NAME β¨
la_geamv β la_geamv: matrix-vector multiply |A| * |x|, general. that's the whole vibe. absolute values everywhere, no cap.
π¦ SYNOPSIS π¦
π Functions π
subroutine cla_geamv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy)βCLA_GEAMVcomputes a matrix-vector product using a general matrix to calculate error bounds. the complex one πsubroutine dla_geamv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy)βDLA_GEAMVcomputes a matrix-vector product using a general matrix to calculate error bounds. the double precision one β¨subroutine sla_geamv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy)βSLA_GEAMVcomputes a matrix-vector product using a general matrix to calculate error bounds. the real single precision one πΈsubroutine zla_geamv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy)βZLA_GEAMVcomputes a matrix-vector product using a general matrix to calculate error bounds. the double complex one π
likeβ¦ same energy, different types. pick your flavor π
π Detailed Description π
(that's it. that's the section. the real tea is all down below π)
π₯ Function Documentation π₯
π
subroutine cla_geamv π
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. periodt.
π Purpose π
lowkey the whole point of this function, straight from the source:
!>
!> 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.
!>
so basically: it's for error bounds π«Ά and it nudges tiny components away from zero by (N+1) times the underflow threshold so underflow doesn't wreck the evaluation. but zero entries stay zero β a zero entry counts as zero if every multiplication that went into computing it had at least one zero multiplicand. it's giving "protect the vibe, not the zeros" π
πΈ Parameters πΈ
TRANSβTRANS is INTEGER. on entry,TRANSspecifies the operation to be performed, like so:
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. yes bestie, BLAS_TRANS and BLAS_CONJ_TRANS give you the same line here β that's literally what the page says, don't come for me π
MβM is INTEGER. on entry,Mspecifies the number of rows of the matrixA.Mmust be at least zero. unchanged on exit.NβN is INTEGER. on entry,Nspecifies the number of columns of the matrixA.Nmust be at least zero. unchanged on exit.ALPHAβALPHA is REAL. on entry,ALPHAspecifies the scalar alpha. unchanged on exit.AβA is COMPLEX array, dimension (LDA,n). before entry, the leadingmbynpart of the arrayAmust contain the matrix of coefficients. unchanged on exit.LDAβLDA is INTEGER. on entry,LDAspecifies the first dimension ofAas declared in the calling (sub) program.LDAmust be at leastmax( 1, m ). unchanged on exit.XβX is COMPLEX array, dimension ( 1 + ( n - 1 )*abs( INCX ) )whenTRANS = 'N'or'n'and at least( 1 + ( m - 1 )*abs( INCX ) )otherwise. before entry, the incremented arrayXmust contain the vector x. unchanged on exit.INCXβINCX is INTEGER. on entry,INCXspecifies the increment for the elements ofX.INCXmust not be zero. unchanged on exit. π« no zero increments, that's the rule.BETAβBETA is REAL. on entry,BETAspecifies the scalar beta. whenBETAis supplied as zero thenYneed not be set on input. unchanged on exit. (free pass when it's zero, we love efficiency β¨)YβY is REAL array, dimension ( 1 + ( m - 1 )*abs( INCY ) )whenTRANS = 'N'or'n'and at least( 1 + ( n - 1 )*abs( INCY ) )otherwise. before entry withBETAnon-zero, the incremented arrayYmust contain the vector y. on exit,Yis overwritten by the updated vector y. if eithermornis zero, thenYnot referenced and the function performs a quick return. πββοΈπ¨INCYβINCY is INTEGER. on entry,INCYspecifies the increment for the elements ofY.INCYmust not be zero. unchanged on exit.
Level 2 Blas routine. that's the whole note, and honestly? iconic.
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
β Definition β
Definition at line 175 of file cla_geamv.f.
π¦ subroutine dla_geamv π¦
subroutine dla_geamv (integer trans, integer m, integer n, 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)
DLA_GEAMV computes a matrix-vector product using a general matrix to calculate error bounds. same assignment, double precision era π
π Purpose π
!>
!> DLA_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.
!>
identical purpose, identical nudge by (N+1) times the underflow threshold, identical "zeros stay zero" energy. it's consistent, and we respect that π
πΈ Parameters πΈ
TRANSβTRANS is INTEGER. on entry,TRANSspecifies 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.
MβM is INTEGER. on entry,Mspecifies the number of rows of the matrixA.Mmust be at least zero. unchanged on exit.NβN is INTEGER. on entry,Nspecifies the number of columns of the matrixA.Nmust be at least zero. unchanged on exit.ALPHAβALPHA is DOUBLE PRECISION. on entry,ALPHAspecifies the scalar alpha. unchanged on exit.AβA is DOUBLE PRECISION array, dimension ( LDA, n ). before entry, the leadingmbynpart of the arrayAmust contain the matrix of coefficients. unchanged on exit.LDAβLDA is INTEGER. on entry,LDAspecifies the first dimension ofAas declared in the calling (sub) program.LDAmust be at leastmax( 1, m ). unchanged on exit.XβX is DOUBLE PRECISION array, dimension ( 1 + ( n - 1 )*abs( INCX ) )whenTRANS = 'N'or'n'and at least( 1 + ( m - 1 )*abs( INCX ) )otherwise. before entry, the incremented arrayXmust contain the vector x. unchanged on exit.INCXβINCX is INTEGER. on entry,INCXspecifies the increment for the elements ofX.INCXmust not be zero. unchanged on exit.BETAβBETA is DOUBLE PRECISION. on entry,BETAspecifies the scalar beta. whenBETAis supplied as zero thenYneed not be set on input. unchanged on exit.YβY is DOUBLE PRECISION array, dimension at least ( 1 + ( m - 1 )*abs( INCY ) )whenTRANS = 'N'or'n'and at least( 1 + ( n - 1 )*abs( INCY ) )otherwise. before entry withBETAnon-zero, the incremented arrayYmust contain the vector y. on exit,Yis overwritten by the updated vector y. if eithermornis zero, thenYnot referenced and the function performs a quick return. πINCYβINCY is INTEGER. on entry,INCYspecifies the increment for the elements ofY.INCYmust not be zero. unchanged on exit.
Level 2 Blas routine. still iconic, still true.
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
β Definition β
Definition at line 174 of file dla_geamv.f.
π subroutine sla_geamv π
subroutine sla_geamv (integer trans, integer m, integer n, real alpha, real,
dimension( lda, * ) a, integer lda, real, dimension( * ) x, integer
incx, real beta, real, dimension( * ) y, integer incy)
SLA_GEAMV computes a matrix-vector product using a general matrix to calculate error bounds. single precision bestie, real numbers only, still slaying πΈ
π Purpose π
(the tea continues in part 2, don't go anywhere π«Ά)
πΈ Parameters πΈ
okay so sla_geamv rolls with ten arguments and every single one has a whole personality β let's go π
TRANSβINTEGER. on entry, this tells us which operation we're doing, and the menu is:
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, bestie β¨
MβINTEGER. on entry it's the number of rows of the matrixA.Mhas to be at least zero (M >= 0, no cap π₯²). unchanged on exit.NβINTEGER. on entry it's the number of columns of the matrixA.Nmust be at least zero too. unchanged on exit.ALPHAβREAL. on entry it's the scalaralpha. unchanged on exit. she's just vibing, not changing.AβREALarray, dimension( LDA, n ). before entry, the leadingmbynpart of the arrayAmust contain the matrix of coefficients π₯. unchanged on exit.LDAβINTEGER. on entry it's the first dimension ofAas declared in the calling (sub) program.LDAmust be at leastmax( 1, m ). unchanged on exit.XβREALarray, dimension( 1 + ( n - 1 )*abs( INCX ) )whenTRANS = 'N'or'n', and at least( 1 + ( m - 1 )*abs( INCX ) )otherwise. before entry, the incremented arrayXmust contain the vectorx. unchanged on exit π¦INCXβINTEGER. on entry it's the increment for the elements ofX.INCXmust not be zero β fr fr, do not do that π«. unchanged on exit.BETAβREAL. on entry it's the scalarbeta. and here's the cute part: whenBETAis supplied as zero,Ydoesn't even need to be set on input, she's off the hook π . unchanged on exit.YβREALarray, dimension at least( 1 + ( m - 1 )*abs( INCY ) )whenTRANS = 'N'or'n', and at least( 1 + ( n - 1 )*abs( INCY ) )otherwise. before entry withBETAnon-zero, the incremented arrayYmust contain the vectory. on exit,Yis overwritten by the updated vectoryβ she's been through a whole transformation, periodt. and if eithermornis zero, thenYis not referenced and the function performs a quick return πββοΈπ¨INCYβINTEGER. on entry it's the increment for the elements ofY.INCYmust not be zero (same rule, no exceptions). unchanged on exit.
Level 2 Blas routine. that's the whole flex. icon behavior only π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
definition at line 174 of file sla_geamv.f. the receipts are right there π§Ύ
π¦ subroutine zla_geamv π¦
the complex edition, and honestly she ate:
subroutine zla_geamv (integer trans, integer m, integer n, double precision
alpha, complex*16, dimension( lda, * ) a, integer lda, complex*16,
dimension( * ) x, integer incx, double precision beta, double precision,
dimension( * ) y, integer incy)
ZLA_GEAMV computes a matrix-vector product using a general matrix to calculate error bounds. same job, bigger numbers, more sparkle β¨
π Purpose π
okay so ZLA_GEAMV performs one of these 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. that's the safety net, she's got your back π«Ά
to prevent unnecessarily large errors for block-structure embedded in general matrices, zero components are not perturbed. and a zero entry is considered if all multiplications involved in computing that entry have at least one zero multiplicand. iykyk β that's the whole rule π
π Parameters π
same ten besties, but now with complex energy:
TRANSβINTEGER. on entry,TRANSspecifies 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.
MβINTEGER. on entry,Mspecifies the number of rows of the matrixA.Mmust be at least zero. unchanged on exit.NβINTEGER. on entry,Nspecifies the number of columns of the matrixA.Nmust be at least zero. unchanged on exit.ALPHAβDOUBLE PRECISION. on entry,ALPHAspecifies the scalaralpha. unchanged on exit.AβCOMPLEX*16array, dimension( LDA, n ). before entry, the leadingmbynpart of the arrayAmust contain the matrix of coefficients. unchanged on exit.LDAβINTEGER. on entry,LDAspecifies the first dimension ofAas declared in the calling (sub) program.LDAmust be at leastmax( 1, m ). unchanged on exit.XβCOMPLEX*16array, dimension at least( 1 + ( n - 1 )*abs( INCX ) )whenTRANS = 'N'or'n'and at least( 1 + ( m - 1 )*abs( INCX ) )otherwise. before entry, the incremented arrayXmust contain the vectorx. unchanged on exit πINCXβINTEGER. on entry,INCXspecifies the increment for the elements ofX.INCXmust not be zero. unchanged on exit.BETAβDOUBLE PRECISION. on entry,BETAspecifies the scalarbeta. whenBETAis supplied as zero thenYneed not be set on input. unchanged on exit.YβDOUBLE PRECISIONarray, dimension( 1 + ( m - 1 )*abs( INCY ) )whenTRANS = 'N'or'n'and at least( 1 + ( n - 1 )*abs( INCY ) )otherwise. before entry withBETAnon-zero, the incremented arrayYmust contain the vectory. on exit,Yis overwritten by the updated vectory. and if eithermornis zero, thenYis not referenced and the function performs a quick return π΄INCYβINTEGER. on entry,INCYspecifies the increment for the elements ofY.INCYmust not be zero. unchanged on exit.
Level 2 Blas routine. again. consistency is the moment π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
definition at line 175 of file zla_geamv.f. and that's the complex receipt, stamped and everything π§Ύβ¨
π«Ά Author π«Ά
generated automatically by Doxygen for LAPACK from the source code. so like, a robot wrote this one, but she understood the assignment ngl π€π
aaaand that's a wrap bestie π this whole page is from LAPACK, Version 3.12.0, and it's dated la_geamv(3) β go forth, call your error bounds, and slay π
β¨π₯
π¦ 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