SRC/slarfb.f(3)
π SRC/slarfb.f
okay so bestie, this is a LAPACK manpage for slarfb and it's genuinely iconic β it's the girl that applies your block reflector (or its transpose) to a general rectangular matrix. fr fr, she does the heavy lifting so you don't have to. let's get into it π
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine slarfb (side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
SLARFB applies a block reflector or its transpose to a general rectangular matrix. that's the whole vibe. π
πΈ FUNCTION/SUBROUTINE DOCUMENTATION πΈ
subroutine slarfb (character side, character trans, character direct, character storev, integer m, integer n, integer k, real, dimension( ldv, * ) v, integer ldv, real, dimension( ldt, * ) t, integer ldt, real, dimension( ldc, * ) c, integer ldc, real, dimension( ldwork, * ) work, integer ldwork)
SLARFB applies a block reflector or its transpose to a general rectangular matrix. yes ma'am π
π¦ PURPOSE π¦
SLARFB applies a real block reflector H or its transpose H**T to a real m by n matrix C, from either the left or the right.
like, she takes your C and she transforms it. main character energy only. β¨
π PARAMETERS π
- SIDE β
SIDE is CHARACTER*1, and it's literally just "which side tho":= 'L': apply H or H**T from the Left= 'R': apply H or H**T from the Right
- TRANS β
TRANS is CHARACTER*1, the transpose vibe check:= 'N': apply H (No transpose)= 'T': apply H**T (Transpose)
- DIRECT β
DIRECT is CHARACTER*1, and it explains how H is formed from a product of elementary reflectors:= 'F': H = H(1) H(2) . . . H(k) (Forward)= 'B': H = H(k) . . . H(2) H(1) (Backward)
- STOREV β
STOREV is CHARACTER*1, which tells you how the vectors that define the elementary reflectors are stored:= 'C': Columnwise= 'R': Rowwise
- M β
M is INTEGER, aka the number of rows of the matrix C. π - N β
N is INTEGER, aka the number of columns of the matrix C. π - K β
K is INTEGER, the order of the matrix T (= the number of elementary reflectors whose product defines the block reflector). the constraints are NOT optional, bestie:- If
SIDE = 'L',M >= K >= 0; - if
SIDE = 'R',N >= K >= 0.
- If
- V β
V is REAL array, dimension:
(LDV,K) if STOREV = 'C'
(LDV,M) if STOREV = 'R' and SIDE = 'L'
(LDV,N) if STOREV = 'R' and SIDE = 'R'
The matrix V. see Further Details below, it's worth it, the diagrams eat π
- LDV β
LDV is INTEGER, the leading dimension of the array V:- If
STOREV = 'C'andSIDE = 'L',LDV >= max(1,M); - if
STOREV = 'C'andSIDE = 'R',LDV >= max(1,N); - if
STOREV = 'R',LDV >= K.
- If
- T β
T is REAL array, dimension(LDT,K). it's the triangular k by k matrix T in the representation of the block reflector. she's triangular, she's iconic, she's doing her best. π - LDT β
LDT is INTEGER, the leading dimension of the array T. andLDT >= K. no exceptions, periodt. - C β
C is REAL array, dimension(LDC,N):- On entry, the m by n matrix C.
- On exit, C is overwritten by
H*CorH**T*CorC*HorC*H**T. yeah she gets fully replaced, hope you didn't need the original π
- LDC β
LDC is INTEGER, the leading dimension of the array C.LDC >= max(1,M). - WORK β
WORK is REAL array, dimension(LDWORK,K). her little workspace moment π§ - LDWORK β
LDWORK is INTEGER, the leading dimension of the array WORK:- If
SIDE = 'L',LDWORK >= max(1,N); - if
SIDE = 'R',LDWORK >= max(1,M).
- If
π«Ά AUTHOR π«Ά
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
the whole squad showed up, we love a collab β¨
π FURTHER DETAILS π
The shape of the matrix V and the storage of the vectors which define the H(i) is best illustrated by the following example with n = 5 and k = 3. The triangular part of V (including its diagonal) is not referenced.
ok so this next bit is the part where the diagrams are genuinely the best thing on the page β look at her go:
DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
( v1 1 ) ( 1 v2 v2 v2 )
( v1 v2 1 ) ( 1 v3 v3 )
( v1 v2 v3 )
( v1 v2 v3 )
DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
V = ( v1 v2 v3 ) V = ( v1 v1 1 )
( v1 v2 v3 ) ( v2 v2 v2 1 )
( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
( 1 v3 )
( 1 )
β οΈ reminder bestie: the triangular part of V (including its diagonal) is not referenced. don't come for her, she's just not looking at it. π
π Definition
Definition at line 194 of file slarfb.f.
π« AUTHOR π«
Generated automatically by Doxygen for LAPACK from the source code. she was born this way, no cap π¦
and that's the page! this whole thing is from LAPACK Version 3.12.0 for SRC/slarfb.f(3) β slay, go call your reflectors responsibly. πβ¨π
π¦ 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