BLAS/SRC/cher2k.f(3)

πŸ’– BLAS/SRC/cher2k.f β€” the CHER2K glow-up πŸ’–

okay bestie, buckle up, because we're diving into BLAS/SRC/cher2k.f from the LAPACK fam, and honestly? she's a baddie. hermitian rank-2k updates are literally her whole personality.


✨ NAME ✨

BLAS/SRC/cher2k.f β€” yes that's the whole name, she's mysterious like that πŸ’…


🌸 SYNOPSIS 🌸

Functions/Subroutines

  • subroutine cher2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) β€” CHER2K, the main character πŸ‘‘

πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

subroutine cher2k (character uplo, character trans, integer n, integer k, complex alpha, complex, dimension(lda,*) a, integer lda, complex, dimension(ldb,*) b, integer ldb, real beta, complex, dimension(ldc,*) c, integer ldc)

CHER2K 🫢

Purpose:

okay so, CHER2K does one of these hermitian rank 2k operations, and she does it flawlessly:

   C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C,

or

   C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C,

where alpha and beta are scalars, and here's the tea: beta is real, C is an n by n hermitian matrix, and A and B are n by k matrices in the first case and k by n matrices in the second case. periodt. ✨

Parameters

  • UPLO β€” UPLO is CHARACTER*1. on entry, UPLO says whether we're referencing the upper or lower triangular part of the array C, like this:
    • UPLO = 'U' or 'u' β†’ only the upper triangular part of C is to be referenced. πŸ’–
    • UPLO = 'L' or 'l' β†’ only the lower triangular part of C is to be referenced. πŸ’–
  • TRANS β€” TRANS is CHARACTER*1. on entry, TRANS says which operation we're doing, and it's giving:
    • TRANS = 'N' or 'n' β†’
C := alpha*A*B**H          +
     conjg( alpha )*B*A**H +
     beta*C.
  • TRANS = 'C' or 'c' β†’
C := alpha*A**H*B          +
     conjg( alpha )*B**H*A +
     beta*C.
  • N β€” N is INTEGER. on entry, N specifies the order of the matrix C. N must be at least zero. no negative nonsense, she's not about that life 🚫
  • K β€” K is INTEGER. on entry with TRANS = 'N' or 'n', K specifies the number of columns of the matrices A and B, and on entry with TRANS = 'C' or 'c', K specifies the number of rows of the matrices A and B. K must be at least zero too. slay.
  • ALPHA β€” ALPHA is COMPLEX. on entry, ALPHA specifies the scalar alpha. she's complex and she owns it πŸ’…
  • A β€” A is COMPLEX array, dimension ( LDA, ka ), where ka is k when TRANS = 'N' or 'n', and is n otherwise. before entry with TRANS = 'N' or 'n', the leading n by k part of the array A must contain the matrix A, otherwise the leading k by n part of the array A must contain the matrix A.
  • LDA β€” LDA is INTEGER. on entry, LDA specifies the first dimension of A as declared in the calling (sub) program. when TRANS = 'N' or 'n' then LDA must be at least max( 1, n ), otherwise LDA must be at least max( 1, k ). respect the bounds bestie πŸ™
  • B β€” B is COMPLEX array, dimension ( LDB, kb ), where kb is k when TRANS = 'N' or 'n', and is n otherwise. before entry with TRANS = 'N' or 'n', the leading n by k part of the array B must contain the matrix B, otherwise the leading k by n part of the array B must contain the matrix B.
  • LDB β€” LDB is INTEGER. on entry, LDB specifies the first dimension of B as declared in the calling (sub) program. when TRANS = 'N' or 'n' then LDB must be at least max( 1, n ), otherwise LDB must be at least max( 1, k ).
  • BETA β€” BETA is REAL. on entry, BETA specifies the scalar beta. yes she's real, unlike some people 😭
  • C β€” C is COMPLEX array, dimension ( LDC, N ).
    • before entry with UPLO = 'U' or 'u', the leading n by n upper triangular part of the array C must contain the upper triangular part of the hermitian matrix and the strictly lower triangular part of C is not referenced. on exit, the upper triangular part of the array C is overwritten by the upper triangular part of the updated matrix. πŸ¦‹
    • before entry with UPLO = 'L' or 'l', the leading n by n lower triangular part of the array C must contain the lower triangular part of the hermitian matrix and the strictly upper triangular part of C is not referenced. on exit, the lower triangular part of the array C is overwritten by the lower triangular part of the updated matrix. πŸ¦‹
    • note that the imaginary parts of the diagonal elements need not be set, they are assumed to be zero, and on exit they are set to zero. not me assuming things and then setting them to zero 😌
  • LDC β€” LDC is INTEGER. on entry, LDC specifies the first dimension of C as declared in the calling (sub) program. LDC must be at least max( 1, n ).

Author

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

the whole squad showed up, we love a collaborative queen πŸ‘‘

Further Details:

Level 3 Blas routine.

-- Written on 8-February-1989.
   Jack Dongarra, Argonne National Laboratory.
   Iain Duff, AERE Harwell.
   Jeremy Du Croz, Numerical Algorithms Group Ltd.
   Sven Hammarling, Numerical Algorithms Group Ltd.

-- Modified 8-Nov-93 to set C(J,J) to REAL( C(J,J) ) when BETA = 1.
   Ed Anderson, Cray Research Inc.

the lore is real, the history is rich, the 1989 energy is immaculate ✨

definition at line 196 of file cher2k.f. she lives at line 196, that's her address, don't @ me πŸ“


Author

generated automatically by Doxygen for LAPACK from the source code. yeah, Doxygen did the paperwork, we just did the vibes πŸ’…


Version 3.12.0, dated Tue Nov 28 2023 12:08:41, from BLAS/SRC/cher2k.f(3). that's the sign-off bestie β€” version 3.12.0, timestamped Tue Nov 28 2023 12:08:41, straight out of BLAS/SRC/cher2k.f(3). ily, go forth and update your hermitian matrices responsibly πŸŽ€πŸ«ΆπŸ’–