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) β€” CGEMV
  • subroutine dgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) β€” DGEMV
  • subroutine sgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) β€” SGEMV
  • subroutine 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 β€” 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**H*x + beta*y.

(yes, for the complex version 'C' is the conjugate transpose. the H is doing the heavy lifting πŸ’…)

  • M β€” M is INTEGER. On entry, M specifies the number of rows of the matrix A. M must be at least zero.
  • N β€” N is INTEGER. On entry, N specifies the number of columns of the matrix A. N must be at least zero.
  • ALPHA β€” ALPHA is COMPLEX. On entry, ALPHA specifies the scalar alpha.
  • 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.
  • 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 ).
  • X β€” X is COMPLEX 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.
  • INCX β€” INCX is INTEGER. On entry, INCX specifies the increment for the elements of X. INCX must not be zero. (like, actually β€” zero is not the move πŸ™ˆ)
  • BETA β€” BETA is COMPLEX. On entry, BETA specifies the scalar beta. When BETA is supplied as zero then Y need not be set on input. cute little shortcut πŸŽ€
  • Y β€” Y is COMPLEX 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 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. πŸƒβ€β™€οΈπŸ’¨
  • INCY β€” INCY is INTEGER. On entry, INCY specifies the increment for the elements of Y. INCY 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 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 **H anywhere πŸ‘€

πŸ’– 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.
  • M β€” M is INTEGER. On entry, M specifies the number of rows of the matrix A. M must be at least zero.
  • N β€” N is INTEGER. On entry, N specifies the number of columns of the matrix A. N must be at least zero.
  • ALPHA β€” ALPHA is DOUBLE PRECISION. On entry, ALPHA specifies the scalar alpha.
  • A β€” A is DOUBLE PRECISION array, dimension ( LDA, N ). Before entry, the leading m by n part of the array A must contain the matrix of coefficients.
  • 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 ).
  • 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.
  • INCX β€” INCX is INTEGER. On entry, INCX specifies the increment for the elements of X. INCX must not be zero.
  • 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.
  • 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 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.
  • INCY β€” INCY is INTEGER. On entry, INCY specifies the increment for the elements of Y. INCY 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 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 β€” 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.
  • M β€” M is INTEGER. On entry, M specifies the number of rows of the matrix A. M must be at least zero.
  • N β€” N is INTEGER. On entry, N specifies the number of columns of the matrix A. N must be at least zero.
  • ALPHA β€” ALPHA is REAL. On entry, ALPHA specifies the scalar alpha.
  • A β€” A is REAL array, dimension ( LDA, N ). Before entry, the leading m by n part of the array A must contain the matrix of coefficients.
  • 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 ).
  • 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.
  • INCX β€” (ok and this is literally exactly where part one of the page runs out 😭 INCX is INTEGER, and the rest is waiting for you in the next part β€” don't go anywhere)
  • INCX β€” INTEGER. On entry, INCX specifies the increment for the elements of X. must not be zero, bestie β€” that's the vibe check it literally has to pass. πŸ’…
  • BETA β€” REAL. On entry, BETA specifies the scalar beta. When BETA is supplied as zero then Y need not be set on input. Slay, a little shortcut. ✨
  • Y β€” 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 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 is not referenced and the function performs a quick return. 🫢
  • INCY β€” INTEGER. On entry, INCY specifies the increment for the elements of Y. 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 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 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, 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**H*x + beta*y.
  • M β€” INTEGER. On entry, M specifies the number of rows of the matrix A. M must be at least zero. πŸ‘‘
  • N β€” INTEGER. On entry, N specifies the number of columns of the matrix A. N must be at least zero. 🌈
  • ALPHA β€” COMPLEX*16. On entry, ALPHA specifies the scalar alpha. πŸ’…
  • A β€” COMPLEX*16 array, dimension ( LDA, N ). Before entry, the leading m by n part of the array A must contain the matrix of coefficients. πŸŽ€
  • LDA β€” 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 ). ✨
  • X β€” COMPLEX*16 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. πŸ¦‹
  • INCX β€” INTEGER. On entry, INCX specifies the increment for the elements of X. must not be zero. 🫢
  • BETA β€” COMPLEX*16. On entry, BETA specifies the scalar beta. When BETA is supplied as zero then Y need not be set on input. πŸ’–
  • Y β€” COMPLEX*16 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 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 is not referenced and the function performs a quick return. 🌸
  • INCY β€” INTEGER. On entry, INCY specifies the increment for the elements of Y. 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 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 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