BLAS/SRC/srotm.f(3)

✨ BLAS/SRC/srotm.f ✨

okay bestie so this page is from the LAPACK manual, and it's all about one lil subroutine that's honestly lowkey iconic πŸ’…


🌸 NAME 🌸

BLAS/SRC/srotm.f β€” that's the file, that's the whole name section, we love a minimal queen πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

Functions/Subroutines

subroutine srotm (n, sx, incx, sy, incy, sparam)

SROTM β€” that's the vibe ✨


πŸ‘‘ Function/Subroutine Documentation πŸ‘‘

subroutine srotm (integer n, real, dimension(*) sx, integer incx, real,
    dimension(*) sy, integer incy, real, dimension(5) sparam)

SROTM πŸ’–

πŸ“ Purpose πŸ“

so what does it DO, you ask? it APPLYs the MODIFIED GIVENS TRANSFORMATION, H, to the 2 BY N MATRIX:

(SX**T) , WHERE **T INDICATES TRANSPOSE. THE ELEMENTS OF SX ARE IN
(SX**T)

and the elements of SX live at:

SX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE
LX = (-INCX)*N, AND SIMILARLY FOR SY USING USING LY AND INCY.
WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS..
ngl bestie, that "USING USING" double-up is in the original and I'm keeping it, fr fr, no cap 🫢

and here's the part where H shape-shifts based on SFLAG β€” she's giving main character energy, she contains multitudes 🌈:

SFLAG=-1.E0     SFLAG=0.E0        SFLAG=1.E0     SFLAG=-2.E0

  (SH11  SH12)    (1.E0  SH12)    (SH11  1.E0)    (1.E0  0.E0)
H=(          )    (          )    (          )    (          )
  (SH21  SH22),   (SH21  1.E0),   (-1.E0 SH22),   (0.E0  1.E0).
SEE  SROTMG FOR A DESCRIPTION OF DATA STORAGE IN SPARAM.

like, if you wanna know how the data is stored in SPARAM, go check out SROTMG β€” she's the source of truth, periodt πŸ’€βœ¨

πŸŽ€ Parameters πŸŽ€

  • N β€” N is INTEGER, the number of elements in the input vector(s) 🧚
  • SX β€” SX is a REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) πŸ’œ
  • INCX β€” INCX is INTEGER, the storage spacing between elements of SX ⭐
  • SY β€” SY is a REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) 🌸
  • INCY β€” INCY is INTEGER, the storage spacing between elements of SY πŸ”₯
  • SPARAM β€” SPARAM is a REAL array, dimension (5), and it's packed like this, bestie:
SPARAM(1)=SFLAG
SPARAM(2)=SH11
SPARAM(3)=SH21
SPARAM(4)=SH12
SPARAM(5)=SH22

🫢 Author 🫢

these absolute legends wrote it:

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

and also, cute detail: Definition at line 96 of file srotm.f. πŸ“


πŸ’« Author πŸ’«

Generated automatically by Doxygen for LAPACK from the source code. πŸ€–βœ¨ (yes the machine wrote it, she's a bot, we still stan)

and that's the whole page bestie!! πŸ’– Version 3.12.0, dated Tue Nov 28 2023 12:08:41, and this little slice of BLAS/SRC/srotm.f(3) history β€” mwah, iconic, no notes πŸŽ€πŸ¦‹πŸ’