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βUPLOisCHARACTER*1. on entry,UPLOsays whether we're referencing the upper or lower triangular part of the arrayC, like this:UPLO = 'U' or 'u'β only the upper triangular part ofCis to be referenced. πUPLO = 'L' or 'l'β only the lower triangular part ofCis to be referenced. π
TRANSβTRANSisCHARACTER*1. on entry,TRANSsays 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βNisINTEGER. on entry,Nspecifies the order of the matrixC.Nmust be at least zero. no negative nonsense, she's not about that life π«KβKisINTEGER. on entry withTRANS = 'N' or 'n',Kspecifies the number of columns of the matricesAandB, and on entry withTRANS = 'C' or 'c',Kspecifies the number of rows of the matricesAandB.Kmust be at least zero too. slay.ALPHAβALPHAisCOMPLEX. on entry,ALPHAspecifies the scalar alpha. she's complex and she owns it πAβAisCOMPLEX array, dimension ( LDA, ka ), where ka is k when TRANS = 'N' or 'n', and is n otherwise.before entry withTRANS = 'N' or 'n', the leadingnbykpart of the arrayAmust contain the matrixA, otherwise the leadingkbynpart of the arrayAmust contain the matrixA.LDAβLDAisINTEGER. on entry,LDAspecifies the first dimension ofAas declared in the calling (sub) program. whenTRANS = 'N' or 'n'thenLDAmust be at leastmax( 1, n ), otherwiseLDAmust be at leastmax( 1, k ). respect the bounds bestie πBβBisCOMPLEX array, dimension ( LDB, kb ), where kb is k when TRANS = 'N' or 'n', and is n otherwise.before entry withTRANS = 'N' or 'n', the leadingnbykpart of the arrayBmust contain the matrixB, otherwise the leadingkbynpart of the arrayBmust contain the matrixB.LDBβLDBisINTEGER. on entry,LDBspecifies the first dimension ofBas declared in the calling (sub) program. whenTRANS = 'N' or 'n'thenLDBmust be at leastmax( 1, n ), otherwiseLDBmust be at leastmax( 1, k ).BETAβBETAisREAL. on entry,BETAspecifies the scalar beta. yes she's real, unlike some people πCβCisCOMPLEX array, dimension ( LDC, N ).- before entry with
UPLO = 'U' or 'u', the leadingnbynupper triangular part of the arrayCmust contain the upper triangular part of the hermitian matrix and the strictly lower triangular part ofCis not referenced. on exit, the upper triangular part of the arrayCis overwritten by the upper triangular part of the updated matrix. π¦ - before entry with
UPLO = 'L' or 'l', the leadingnbynlower triangular part of the arrayCmust contain the lower triangular part of the hermitian matrix and the strictly upper triangular part ofCis not referenced. on exit, the lower triangular part of the arrayCis 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 π
- before entry with
LDCβLDCisINTEGER. on entry,LDCspecifies the first dimension ofCas declared in the calling (sub) program.LDCmust be at leastmax( 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, fromBLAS/SRC/cher2k.f(3). that's the sign-off bestie β version3.12.0, timestampedTue Nov 28 2023 12:08:41, straight out ofBLAS/SRC/cher2k.f(3). ily, go forth and update your hermitian matrices responsibly ππ«Άπ
π¦ where this page comes from
- centos-stream 10: blas 3.12.0-7.el10 Β· BSD-3-Clause-Open-MPI
- fedora 43: blas 3.12.0-10.fc43 Β· BSD-3-Clause-Open-MPI
- fedora 43: blas 3.12.0-10.fc43 Β· BSD-3-Clause-Open-MPI
- fedora 44: blas 3.12.0-11.fc44 Β· BSD-3-Clause-Open-MPI
- fedora 44: blas 3.12.0-11.fc44 Β· BSD-3-Clause-Open-MPI
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms