BLAS/SRC/chemv.f(3)

πŸ’… BLAS/SRC/chemv.f(3) β€” Library Functions Manual

okay so picture this: you open the manual for BLAS/SRC/chemv.f(3) and it's a whole mood. it's a Fortran file from the BLAS crew, it does one hermitian matrix-vector thing, and honestly?? it ate. let's get into it bestie πŸŽ€


✨ NAME ✨

BLAS/SRC/chemv.f β€” like, that's the whole name. short, iconic, no notes πŸ’…


🌸 SYNOPSIS 🌸

Functions/Subroutines

  • subroutine chemv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) β€” CHEMV. that's the one. that's our girl 🫢

πŸ‘‘ Function/Subroutine Documentation πŸ‘‘

subroutine chemv (character uplo, integer n, complex alpha, complex, dimension(lda,*) a, integer lda, complex, dimension(*) x, integer incx, complex beta, complex, dimension(*) y, integer incy)

CHEMV β€” say it with me. the main character of this entire page ✨

🎯 Purpose:

!>
!> CHEMV  performs the matrix-vector  operation
!>
!>    y := alpha*A*x + beta*y,
!>
!> where alpha and beta are scalars, x and y are n element vectors and
!> A is an n by n hermitian matrix.
!>

literally that's it. that's the whole job. alpha, beta, scalars, vectors, one hermitian matrix β€” the math is mathing πŸ”₯


🌈 Parameters

UPLO

!>          UPLO is CHARACTER*1
!>           On entry, UPLO specifies whether the upper or lower
!>           triangular part of the array A is to be referenced as
!>           follows:
!>
!>              UPLO = 'U' or 'u'   Only the upper triangular part of A
!>                                  is to be referenced.
!>
!>              UPLO = 'L' or 'l'   Only the lower triangular part of A
!>                                  is to be referenced.
!>

so it's a CHARACTER*1 and it picks your vibe: 'U' or 'u' means only the upper triangular part of A gets referenced, 'L' or 'l' means only the lower triangular part gets referenced. pick one, bestie, there's no third option πŸ¦‹

N

!>          N is INTEGER
!>           On entry, N specifies the order of the matrix A.
!>           N must be at least zero.
!>

an INTEGER. on entry it's the order of the matrix A, and it must be at least zero. zero is allowed, negative is not, we don't do that here πŸ’€

ALPHA

!>          ALPHA is COMPLEX
!>           On entry, ALPHA specifies the scalar alpha.
!>

COMPLEX scalar named alpha. on entry it's just... alpha. that's the whole description and honestly respect for the brevity 😌

A

!>          A is COMPLEX array, dimension ( LDA, N )
!>           Before entry with  UPLO = 'U' or 'u', the leading n by n
!>           upper triangular part of the array A must contain the upper
!>           triangular part of the hermitian matrix and the strictly
!>           lower triangular part of A is not referenced.
!>           Before entry with UPLO = 'L' or 'l', the leading n by n
!>           lower triangular part of the array A must contain the lower
!>           triangular part of the hermitian matrix and the strictly
!>           upper triangular part of A is not referenced.
!>           Note that the imaginary parts of the diagonal elements need
!>           not be set and are assumed to be zero.
!>

COMPLEX array, dimension ( LDA, N ). this is the big one, so listen up:

  • before entry with UPLO = 'U' or 'u', the leading n by n upper triangular part of A must contain the upper triangular part of the hermitian matrix, and the strictly lower triangular part of A is not referenced (she's not invited to the function).
  • before entry with UPLO = 'L' or 'l', the leading n by n lower triangular part of A must contain the lower triangular part of the hermitian matrix, and the strictly upper triangular part of A is not referenced.
  • and a lil note πŸŽ€: the imaginary parts of the diagonal elements need not be set β€” they're assumed to be zero. so don't stress about them, nobody's checking.

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, n ).
!>

INTEGER, and it's the first dimension of A as declared in the calling (sub) program. the rule: LDA must be at least max( 1, n ). no cap, that's the floor 🫢

X

!>          X is COMPLEX array, dimension at least
!>           ( 1 + ( n - 1 )*abs( INCX ) ).
!>           Before entry, the incremented array X must contain the n
!>           element vector x.
!>

COMPLEX array, dimension at least ( 1 + ( n - 1 )*abs( INCX ) ). before entry, the incremented array X must contain the n element vector x. she's giving main character vector energy πŸ’–

INCX

!>          INCX is INTEGER
!>           On entry, INCX specifies the increment for the elements of
!>           X. INCX must not be zero.
!>

INTEGER, the increment for the elements of X. must not be zero β€” like, seriously, don't πŸ™ˆ

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.
!>

COMPLEX scalar beta. and here's the lil cheat code: when BETA is supplied as zero, Y need not be set on input. free pass, use it 😌✨

Y

!>          Y is COMPLEX array, dimension at least
!>           ( 1 + ( n - 1 )*abs( INCY ) ).
!>           Before entry, the incremented array Y must contain the n
!>           element vector y. On exit, Y is overwritten by the updated
!>           vector y.
!>

COMPLEX array, dimension at least ( 1 + ( n - 1 )*abs( INCY ) ). before entry, the incremented array Y must contain the n element vector y. on exit, Y is overwritten by the updated vector y β€” so yeah, she gets rebuilt in place. don't mourn the old values, it's a glow-up πŸ’…

INCY

!>          INCY is INTEGER
!>           On entry, INCY specifies the increment for the elements of
!>           Y. INCY must not be zero.
!>

INTEGER, the increment for the elements of Y. must not be zero. same rule as INCX, we're consistent here 🌸


🧚 Author

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

a whole committee of legends, we stan 🫢


⭐ 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.
!>

so: it's a Level 2 Blas routine. the vector and matrix arguments are not referenced when N = 0, or M = 0 (yes, that's what it says, and we're quoting it exactly, don't come for me 😭).

and the origin story: written on 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. iconic. historic. the elders really said "let there be linear algebra" πŸ‘‘


πŸ“ Definition

Definition at line 153 of file chemv.f.


πŸ–‹οΈ Author

Generated automatically by Doxygen for LAPACK from the source code. (a bot wrote this bit, honestly relatable πŸ€–)


⚠️ friendly reminder bestie: INCX and INCY must never be zero, N must be at least zero, and LDA must be at least max( 1, n ). break those and it's not a vibe.

and that's the page!! 🌈 sign-off time: this beauty is from LAPACK, Version 3.12.0, and the footer vibes are BLAS/SRC/chemv.f(3). periodt. go forth and multiply your hermitian matrices πŸ’œπŸŽ€βœ¨

πŸ“¦ where this page comes from