DSPR2(3)
π DSPR2(3) π
okay bestie, buckle up β this is a LAPACK page (the library, version coded into the footer, we'll get there) and it's genuinely one of the cuter BLAS routines. it's a Fortran file, living its best life at /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/BLAS/SRC/dspr2.f, and honestly? she ate. β¨
πΈ NAME πΈ
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/BLAS/SRC/dspr2.f β that's the whole name, yes the entire path, no we're not shortening it, she's iconic and her full legal name is on the birth certificate π
π¦ SYNOPSIS π¦
π Functions/Subroutines π
subroutine DSPR2 (uplo, n, alpha, x, incx, y, incy, ap)β hi, this is DSPR2, she's a subroutine, she has eight (8) arguments and she's not sorry about it π«Ά
π Function/Subroutine Documentation π
β DSPR2 β
subroutine DSPR2 (character uplo, integer n, double precision alpha, double precision, dimension(*) x, integer incx, double precision, dimension(*) y, integer incy, double precision, dimension(*) ap)
yeah that's the full signature, all character / integer / double precision goodness, with dimension(*) on x, y and ap β like, she's flexible, she doesn't need to know how big they are, that's a you problem π
π₯ Purpose π₯
okay so. DSPR2 performs the symmetric rank 2 operation:
A := alpha*x*y**T + alpha*y*x**T + A,
where alpha is a scalar, x and y are n element vectors and A is an n by n symmetric matrix, supplied in packed form. that's it. that's the whole vibe. rank-2 update, symmetric, packed, no cap. π§
π Parameters π
π UPLO
UPLO is CHARACTER*1.
on entry, UPLO specifies whether the upper or lower triangular part of the matrix A is supplied in the packed array AP, like this:
UPLO = 'U'or'u'β the upper triangular part ofAis supplied inAP.UPLO = 'L'or'l'β the lower triangular part ofAis supplied inAP.
literally just tell her which triangle, she's not a mind reader (she is a mind reader, but still, help her out) π
π N
N is INTEGER.
on entry, N specifies the order of the matrix A. N must be at least zero. so 0 is allowed, negative is not the move. β
π ALPHA
ALPHA is DOUBLE PRECISION.
on entry, ALPHA specifies the scalar alpha. that's her whole job, she's literally just a scalar, main character energy honestly.
π X
X is DOUBLE PRECISION array, dimension at least
( 1 + ( n - 1 )*abs( INCX ) ).
before entry, the incremented array X must contain the n element vector x. bestie. the incremented one. we don't make the rules π
π INCX
INCX is INTEGER.
on entry, INCX specifies the increment for the elements of X. INCX must not be zero. fr fr, zero is a whole undefined behaviour situation, don't do it π
π Y
Y is DOUBLE PRECISION array, dimension at least
( 1 + ( n - 1 )*abs( INCY ) ).
before entry, the incremented array Y must contain the n element vector y. same deal as X, just the other one π¦
π INCY
INCY is INTEGER.
on entry, INCY specifies the increment for the elements of Y. INCY must not be zero. again: not zero. periodt. π₯
π AP
AP is DOUBLE PRECISION array, dimension at least
( ( n*( n + 1 ) )/2 ).
before entry with UPLO = 'U' or 'u', the array AP must contain the upper triangular part of the symmetric matrix packed sequentially, column by column, so that AP( 1 ) contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 ) respectively, and so on. on exit, the array AP is overwritten by the upper triangular part of the updated matrix.
before entry with UPLO = 'L' or 'l', the array AP must contain the lower triangular part of the symmetric matrix packed sequentially, column by column, so that AP( 1 ) contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 ) respectively, and so on. on exit, the array AP is overwritten by the lower triangular part of the updated matrix.
β οΈ okay this is the important one: AP gets overwritten on exit. like, full glow-up, in place. if you needed the old numbers, that's on you, she told you π
π«Ά Author π«Ά
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
πΈ Further Details πΈ
- Level 2 Blas routine.
- 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.
1986!! she's been slaying since before most of us were born, that's legacy behaviour π
π Definition π
Definition at line 141 of file dspr2.f.
π« Author π«
Generated automatically by Doxygen for LAPACK from the source code. (not a human, not a girlie, just Doxygen doing its little auto-generation thing π€π )
and that's the page!! π one (1) tiny little sign-off: this is LAPACK Version 3.12.0, dated with the good old /home/abui...SRC/dspr2.f(3) in the corner β go forth and rank-2 update your symmetric packed matrices, bestie, i'm obsessed πβ¨π¦
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms