BLAS/SRC/dsyr2k.f(3)
π¦ BLAS/SRC/dsyr2k.f π
okay so this is a page from the Library Functions Manual, and it's literally all about dsyr2k β yes that's a real name, yes it's pronounced however you want, no we're not debating it. sit down bestie, this one's a level-3 BLAS baddie and she's about to eat. β¨
β¨ NAME β¨
BLAS/SRC/dsyr2k.f β the file, the myth, the legend. she does symmetric rank 2k updates and she does them flawlessly. π
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine dsyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)β DSYR2K. that's it. that's the whole vibe. π«Ά
π Function/Subroutine Documentation π
subroutine dsyr2k (character uplo, character trans, integer n, integer k, double precision alpha, double precision, dimension(lda,*) a, integer lda, double precision, dimension(ldb,*) b, integer ldb, double precision beta, double precision, dimension(ldc,*) c, integer ldc)
DSYR2K. iconic. no notes. π
π₯ Purpose:
!>
!> DSYR2K performs one of the symmetric rank 2k operations
!>
!> C := alpha*A*B**T + alpha*B*A**T + beta*C,
!>
!> or
!>
!> C := alpha*A**T*B + alpha*B**T*A + beta*C,
!>
!> where alpha and beta are scalars, C is an n by n symmetric matrix
!> and A and B are n by k matrices in the first case and k by n
!> matrices in the second case.
!>
so basically she takes your symmetric n by n matrix C, does a whole rank-2k glow-up on it with A and B, and hands it back looking like that. two operations, pick your fighter, both slay. π
π§ Parameters π§
UPLO
!> UPLO is CHARACTER*1
!> On entry, UPLO specifies whether the upper or lower
!> triangular part of the array C is to be referenced as
!> follows:
!>
!> 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.
!>
pick a side bestie β 'U'/'u' means we only touch the upper triangular part of C, 'L'/'l' means lower triangular only. choose wisely, we're not looking at the other half at all. π
TRANS
!> TRANS is CHARACTER*1
!> On entry, TRANS specifies the operation to be performed as
!> follows:
!>
!> TRANS = 'N' or 'n' C := alpha*A*B**T + alpha*B*A**T +
!> beta*C.
!>
!> TRANS = 'T' or 't' C := alpha*A**T*B + alpha*B**T*A +
!> beta*C.
!>
!> TRANS = 'C' or 'c' C := alpha*A**T*B + alpha*B**T*A +
!> beta*C.
!>
the main character setting. 'N'/'n' = no transpose, the classic. 'T'/'t' = transpose. 'C'/'c' = conjugate transpose, and for this real routine it's giving exactly the same thing as 'T'/'t' β same formula, no cap. β
N
!> N is INTEGER
!> On entry, N specifies the order of the matrix C. N must be
!> at least zero.
!>
N is the order of the matrix C. must be at least zero, so like, zero is allowed, negative is not, we don't do that here. π
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 = 'T' or 't' or 'C' or 'c', K specifies the number
!> of rows of the matrices A and B. K must be at least zero.
!>
K switches job depending on TRANS, which is honestly so versatile of her. with TRANS = 'N'/'n' she's counting the columns of A and B; with TRANS = 'T'/'t'/'C'/'c' she's counting the rows. must be at least zero. π
ALPHA
!> ALPHA is DOUBLE PRECISION.
!> On entry, ALPHA specifies the scalar alpha.
!>
ALPHA is a DOUBLE PRECISION scalar, and yes she's literally just the scalar alpha. that's the whole description. she's mysterious like that. π«
A
!> A is DOUBLE PRECISION 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.
!>
A is a DOUBLE PRECISION array with dimension ( LDA, ka ), where ka is k when TRANS = 'N'/'n' and is n otherwise. on entry with TRANS = 'N'/'n' the leading n by k part must contain the matrix A; otherwise the leading k by n part is the one carrying the matrix A. she contains multitudes. π¦
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 ).
!>
LDA is the first dimension of A as declared in the calling (sub) program β case-sensitive behaviour, no guessing. when TRANS = 'N'/'n', LDA must be at least max( 1, n ); otherwise at least max( 1, k ). respect the leading dimension or suffer. π₯
B
!> B is DOUBLE PRECISION 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.
!>
B is A's plus-one: DOUBLE PRECISION array, dimension ( LDB, kb ), where kb is k when TRANS = 'N'/'n' and n otherwise. same deal β leading n by k part on entry when TRANS = 'N'/'n', otherwise the leading k by n part. matched set, no cap. π
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 ).
!>
same energy as LDA, just for B: first dimension as declared in the calling (sub) program, max( 1, n ) minimum when TRANS = 'N'/'n', max( 1, k ) otherwise. β
BETA
!> BETA is DOUBLE PRECISION.
!> On entry, BETA specifies the scalar beta.
!>
BETA is DOUBLE PRECISION and she is the scalar beta. short king. π
C
!> C is DOUBLE PRECISION 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 symmetric 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 symmetric 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.
!>
here she is, the main character herself. C is a DOUBLE PRECISION array of dimension ( LDC, N ).
- with
UPLO = 'U'/'u': on entry the leadingnbynupper triangular part holds the upper triangular part of the symmetric matrix, and the strictly lower triangular part ofCis not referenced. on exit that upper triangular part is overwritten by the upper triangular part of the updated matrix. π - with
UPLO = 'L'/'l': on entry the leadingnbynlower triangular part holds the lower triangular part of the symmetric matrix, and the strictly upper triangular part ofCis not referenced. on exit that lower triangular part is overwritten by the lower triangular part of the updated matrix. π
note that "overwritten" bestie β your C is not coming back the same, the updated values move in, that's the whole point of the function. πΈ
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 ).
!>
first dimension of C as declared in the calling (sub) program, and LDC must be at least max( 1, n ). periodt. π
π Author π
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
(the whole squad gets credit, as they should π«Ά)
π 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.
!>
Level 3 BLAS routine, written on 8-February-1989 by Jack Dongarra (Argonne National Laboratory), Iain Duff (AERE Harwell), Jeremy Du Croz (Numerical Algorithms Group Ltd.) and Sven Hammarling (Numerical Algorithms Group Ltd.). vintage. legendary. still relevant in 3.12.0. π₯
π Definition at line 191 of file dsyr2k.f. π
go look, she's right there. β¨
Author (the meta one)
Generated automatically by Doxygen for LAPACK from the source code. not a human, no thoughts, just vibes and parsing. π
and that's the whole page bestie, every flag, every dimension, every max( 1, n ), all of it. π
π cute lil sign-off: this gorgeous thing lives in LAPACK Version 3.12.0, and it's the page for BLAS/SRC/dsyr2k.f β the header said so, so now you know. go forth and symmetrize. π¦πΈβ¨
π¦ 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