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βNisINTEGER, the number of elements in the input vector(s) π§SXβSXis aREALarray, dimension( 1 + ( N - 1 )*abs( INCX ) )πINCXβINCXisINTEGER, the storage spacing between elements ofSXβSYβSYis aREALarray, dimension( 1 + ( N - 1 )*abs( INCY ) )πΈINCYβINCYisINTEGER, the storage spacing between elements ofSYπ₯SPARAMβSPARAMis aREALarray, 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 ππ¦π
π¦ 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