DSPR2(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’– 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 of A is supplied in AP.
  • UPLO = 'L' or 'l' β€” the lower triangular part of A is supplied in AP.

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