SGEQRT(3)
π SGEQRT π
okay bestie, so this is a page straight outta LAPACK β like, the Library Functions Manual energy, the whole /home/abui...RC/sgeqrt.f(3) situation π
β and it's literally all about one lil Fortran subroutine that does blocked QR factorization. stay with me, it slaps.
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine SGEQRT (m, n, nb, a, lda, t, ldt, work, info)
that's it, that's the whole vibe: SGEQRT. iconic name, does exactly what it says π«Ά
π Function/Subroutine Documentation π
subroutine SGEQRT (integer m, integer n, integer nb, real, dimension( lda, * ) a,
integer lda, real, dimension( ldt, * ) t, integer ldt,
real, dimension( * ) work, integer info)
SGEQRT β¨ (yes it appears twice in the original, she's got main character energy like that)
π₯ Purpose
!> !> SGEQRT computes a blocked QR factorization of a real M-by-N matrix A !> using the compact WY representation of Q. !>
so, like β blocked QR factorization, real M-by-N matrix A, compact WY representation of Q. that's the whole assignment and she ATE. π
πΈ Parameters πΈ
MβM is INTEGER. the number of rows of the matrix A, and bestie:M >= 0. no negative rows allowed, we don't do that here π«NβN is INTEGER. the number of columns of the matrix A.N >= 0. same rule, fr fr.NBβNB is INTEGER. the block size used in the blocked QR, and the constraint isMIN(M,N) >= NB >= 1β so she's gotta be at least1and no bigger than the smaller ofM/N. respect the range πAβA is REAL array, dimension (LDA,N).- on entry: the
M-by-Nmatrix A. - on exit: the elements on and above the diagonal contain the
min(M,N)-by-Nupper trapezoidal matrix R (and R is upper triangular ifM >= N, slay); the elements below the diagonal are the columns of V. glow-up on exit, honestly π
- on entry: the
LDAβLDA is INTEGER. the leading dimension of the array A.LDA >= max(1,M). non-negotiable.TβT is REAL array, dimension (LDT,MIN(M,N)). the upper triangular block reflectors stored in compact form as a sequence of upper triangular blocks. see below for the deets πLDTβLDT is INTEGER. the leading dimension of the array T.LDT >= NB. periodt.WORKβWORK is REAL array, dimension (NB*N). it's giving workspace. it works so the main character doesn't have to. πINFOβINFO is INTEGER, and this is the vibe check:= 0: successful exit π< 0: ifINFO = -i, thei-th argument had an illegal value π (go check that argument, bestie)
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
the whole friend group showed up for this one π«ΆπΈ
π¦ Further Details
!> !> The matrix V stores the elementary reflectors H(i) in the i-th column !> below the diagonal. For example, if M=5 and N=3, the matrix V is !> !> V = ( 1 ) !> ( v1 1 ) !> ( v1 v2 1 ) !> ( v1 v2 v3 ) !> ( v1 v2 v3 ) !> !> where the vi's represent the vectors which define H(i), which are returned !> in the matrix A. The 1's along the diagonal of V are not stored in A. !>
so the matrix V keeps the elementary reflectors H(i) chilling in the i-th column below the diagonal. example time: if M=5 and N=3, V looks like this β¬οΈ
V = ( 1 )
( v1 1 )
( v1 v2 1 )
( v1 v2 v3 )
( v1 v2 v3 )
and the vi's are the vectors defining H(i), returned in the matrix A. important lil detail: the 1's along the diagonal of V are NOT stored in A. they're just implied. we love a low-maintenance diagonal π
!> !> Let K=MIN(M,N). The number of blocks is B = ceiling(K/NB), where each !> block is of order NB except for the last block, which is of order !> IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block !> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB !> for the last block) T's are stored in the NB-by-K matrix T as !> !> T = (T1 T2 ... TB). !>
the math part, no cap: let K=MIN(M,N). the number of blocks is B = ceiling(K/NB), and every block is of order NB β except the last one, which is of order IB = K - (B-1)*NB (she's special, she's the finale π). for each of the B blocks you get an upper triangular block reflector factor computed: T1, T2, ..., TB. the NB-by-NB ones (and the IB-by-IB one for the last block) get stored in the NB-by-K matrix T like:
T = (T1 T2 ... TB).
look at her, all lined up. obsessed. β¨
π§ Definition location
definition at line 140 of file sgeqrt.f. iykyk. π
π Author (the meta one)
generated automatically by Doxygen for LAPACK from the source code. yes she was born in a build pipeline and yes she's still gorgeous.
and that's the whole page bestie!! remember when i said the top was giving Library Functions Manual and sgeqrt.f(3)?? well down here at the bottom it's LAPACK, Version 3.12.0, dated /home/abui...RC/sgeqrt.f(3) β so yeah, that's the source/version/date trio signing off π«Άπ mwah, go compute something cute. π¦β
π¦ 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