gemv(3)
β¨ gemv(3) β¨
okay so bestie, this page comes from the Library Functions Manual, and it's literally the β¨ main character β¨ of Level 2 BLAS: the general matrix-vector multiply. Four flavors, one vibe. Let's get into it π«Ά
πΈ NAME πΈ
gemv β gemv: general matrix-vector multiply
no cap, that's the whole name. it does exactly what it says on the tin π
π SYNOPSIS π
Functions
subroutine cgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy)βCGEMVsubroutine dgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy)βDGEMVsubroutine sgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy)βSGEMVsubroutine zgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy)βZGEMV
like yes, all four take the same arguments. that's the point. it's giving "same energy, different precision" β
π Detailed Description π
(ok so the original literally has this heading and then nothing under it, soβ¦ we move π§)
π Function Documentation π
π¦ subroutine cgemv
subroutine cgemv (character trans, integer m, integer n, complex alpha,
complex, dimension(lda,*) a, integer lda, complex, dimension(*) x,
integer incx, complex beta, complex, dimension(*) y, integer incy)
CGEMV
π Purpose:
so CGEMV performs one of the matrix-vector operations, and here they are in all their glory:
y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or
y := alpha*A**H*x + beta*y,
where alpha and beta are scalars, x and y are vectors and A is an m by n matrix. periodt. π₯
π Parameters
TRANSβTRANSisCHARACTER*1. On entry,TRANSspecifies 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**H*x + beta*y.
(yes, for the complex version 'C' is the conjugate transpose. the H is doing the heavy lifting π
)
MβMisINTEGER. On entry,Mspecifies the number of rows of the matrixA.Mmust be at least zero.NβNisINTEGER. On entry,Nspecifies the number of columns of the matrixA.Nmust be at least zero.ALPHAβALPHAisCOMPLEX. On entry,ALPHAspecifies the scalar alpha.AβAisCOMPLEXarray, dimension( LDA, N ). Before entry, the leading m by n part of the arrayAmust contain the matrix of coefficients.LDAβLDAisINTEGER. On entry,LDAspecifies the first dimension ofAas declared in the calling (sub) program.LDAmust be at leastmax( 1, m ).XβXisCOMPLEXarray, 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 vector x.INCXβINCXisINTEGER. On entry,INCXspecifies the increment for the elements ofX.INCXmust not be zero. (like, actually β zero is not the move π)BETAβBETAisCOMPLEX. On entry,BETAspecifies the scalar beta. WhenBETAis supplied as zero thenYneed not be set on input. cute little shortcut πYβYisCOMPLEXarray, 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βINCYisINTEGER. On entry,INCYspecifies the increment for the elements ofY.INCYmust not be zero.
πΈ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
β 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.
Definition at line 159 of file cgemv.f.
π¦ subroutine dgemv
subroutine dgemv (character 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)
DGEMV
π Purpose:
DGEMV 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 matrix.
β οΈ heads up bestie: this one only has two forms β no conjugate transpose in the real case.'C'just means plain transpose here. no**Hanywhere π
π Parameters
TRANSβTRANSisCHARACTER*1. On entry,TRANSspecifies 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.
MβMisINTEGER. On entry,Mspecifies the number of rows of the matrixA.Mmust be at least zero.NβNisINTEGER. On entry,Nspecifies the number of columns of the matrixA.Nmust be at least zero.ALPHAβALPHAisDOUBLE PRECISION. On entry,ALPHAspecifies the scalar alpha.AβAisDOUBLE PRECISIONarray, dimension( LDA, N ). Before entry, the leading m by n part of the arrayAmust contain the matrix of coefficients.LDAβLDAisINTEGER. On entry,LDAspecifies the first dimension ofAas declared in the calling (sub) program.LDAmust be at leastmax( 1, m ).XβXisDOUBLE PRECISIONarray, 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 vector x.INCXβINCXisINTEGER. On entry,INCXspecifies the increment for the elements ofX.INCXmust not be zero.BETAβBETAisDOUBLE PRECISION. On entry,BETAspecifies the scalar beta. WhenBETAis supplied as zero thenYneed not be set on input.YβYisDOUBLE PRECISIONarray, 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βINCYisINTEGER. On entry,INCYspecifies the increment for the elements ofY.INCYmust not be zero.
πΈ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
β 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.
Definition at line 157 of file dgemv.f.
π¦ subroutine sgemv
subroutine sgemv (character 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)
SGEMV
π Purpose:
SGEMV 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 matrix.
(single precision, same iconic energy. 'C' is again just A**T up in here π)
π Parameters
TRANSβTRANSisCHARACTER*1. On entry,TRANSspecifies 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.
MβMisINTEGER. On entry,Mspecifies the number of rows of the matrixA.Mmust be at least zero.NβNisINTEGER. On entry,Nspecifies the number of columns of the matrixA.Nmust be at least zero.ALPHAβALPHAisREAL. On entry,ALPHAspecifies the scalar alpha.AβAisREALarray, dimension( LDA, N ). Before entry, the leading m by n part of the arrayAmust contain the matrix of coefficients.LDAβLDAisINTEGER. On entry,LDAspecifies the first dimension ofAas declared in the calling (sub) program.LDAmust be at leastmax( 1, m ).XβXisREALarray, 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 vector x.INCXβ (ok and this is literally exactly where part one of the page runs out πINCXisINTEGER, and the rest is waiting for you in the next part β don't go anywhere)INCXβINTEGER. On entry,INCXspecifies the increment for the elements ofX. must not be zero, bestie β that's the vibe check it literally has to pass. πBETAβREAL. On entry,BETAspecifies the scalar beta. WhenBETAis supplied as zero thenYneed not be set on input. Slay, a little shortcut. β¨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 vector y. On exit,Yis overwritten by the updated vector y. If eithermornis zero, thenYis not referenced and the function performs a quick return. π«ΆINCYβINTEGER. On entry,INCYspecifies the increment for the elements ofY. must not be zero. π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π₯ Further Details π₯
Level 2 Blas routine. The vector and matrix arguments are not referenced whenN = 0, orM = 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.
Definition at line 157 of file sgemv.f. π
π§ zgemv β the COMPLEX*16 routine π§
subroutine zgemv (character trans, integer m, integer n, complex*16 alpha,
complex*16, dimension(lda,*) a, integer lda, complex*16, dimension(*) x,
integer incx, complex*16 beta, complex*16, dimension(*) y, integer incy)
ZGEMV β¨
Purpose β¨
ZGEMV performs one of the matrix-vector operations
y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or
y := alpha*A**H*x + beta*y,
where alpha and beta are scalars, x and y are vectors and A is an m by n matrix. Obsessed with this little trio of ops, no cap. π
Parameters β¨
TRANSβCHARACTER*1. On entry,TRANSspecifies 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**H*x + beta*y.
MβINTEGER. On entry,Mspecifies the number of rows of the matrixA.Mmust be at least zero. πNβINTEGER. On entry,Nspecifies the number of columns of the matrixA.Nmust be at least zero. πALPHAβCOMPLEX*16. On entry,ALPHAspecifies the scalar alpha. πAβCOMPLEX*16array, dimension( LDA, N ). Before entry, the leadingmbynpart of the arrayAmust contain the matrix of coefficients. πLDAβINTEGER. On entry,LDAspecifies the first dimension ofAas declared in the calling (sub) program.LDAmust be at leastmax( 1, m ). β¨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 vector x. π¦INCXβINTEGER. On entry,INCXspecifies the increment for the elements ofX. must not be zero. π«ΆBETAβCOMPLEX*16. On entry,BETAspecifies the scalar beta. WhenBETAis supplied as zero thenYneed not be set on input. πYβCOMPLEX*16array, 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, thenYis not referenced and the function performs a quick return. πΈINCYβINTEGER. On entry,INCYspecifies the increment for the elements ofY. must not be zero. π
Author β¨
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Further Details β¨
Level 2 Blas routine. The vector and matrix arguments are not referenced whenN = 0, orM = 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.
Definition at line 159 of file zgemv.f. π
π Author π
Generated automatically by Doxygen for LAPACK from the source code. π€π
That's the full gemv(3) glow-up, bestie β LAPACK Version 3.12.0, the gemv(3) page, and the footer date are all acknowledged in this cute sign-off instead of a boring copied line. Stay iconic, keep your increments non-zero, and may your matrices always be leading-dimension-compliant. π
β¨ππ«Ά
π¦ 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