SRC/sgeqrt.f(3)
β¨ SRC/sgeqrt.f β¨
ok so bestie, this page is from the LAPACK Library Functions Manual and it's literally all about one little subroutine that does blocked QR factorization. let's get into it π
πΈ SYNOPSIS πΈ
π Functions/Subroutines
subroutine sgeqrt (m, n, nb, a, lda, t, ldt, work, info)
that's SGEQRT, bestie. iconic name, iconic subroutine.
π 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 β say it with me π«Ά
β Purpose
!>!> SGEQRT computes a blocked QR factorization of a real M-by-N matrix A!> using the compact WY representation of Q.!>
so yeah β it takes your real M-by-N matrix A and computes a blocked QR factorization, and it does it with the compact WY representation of Q. that's the whole vibe. π
π Parameters π
MβM is INTEGER. it's the number of rows of the matrixA, and the constraint isM >= 0. no negatives, we don't do that here. β¨NβN is INTEGER. the number of columns of the matrixA, withN >= 0. again, no negative energy. π ββοΈNBβNB is INTEGER. this is the block size used in the blocked QR, and the rule isMIN(M,N) >= NB >= 1. so it's gotta be at least 1 and no bigger thanMIN(M,N). πAβA is REAL array, dimension (LDA,N). on entry it's theM-by-NmatrixA. on exit, the elements on and above the diagonal of the array contain themin(M,N)-by-Nupper trapezoidal matrixR(andRis upper triangular ifM >= N, slay), while the elements below the diagonal are the columns ofV. she transforms, ok?? πLDAβLDA is INTEGER. leading dimension of the arrayA, andLDA >= max(1,M). respect the leading dimension fr fr. βTβT is REAL array, dimension (LDT,MIN(M,N)). this holds the upper triangular block reflectors stored in compact form as a sequence of upper triangular blocks. see below for the details, bestie, it's all spelled out πLDTβLDT is INTEGER. leading dimension of the arrayT, withLDT >= NB. that's the rule. π¦WORKβWORK is REAL array, dimension (NB*N). that's it, that's the workspace. π§INFOβINFO is INTEGER. the vibe check of return values:= 0: successful exit π< 0: ifINFO = -i, thei-th argument had an illegal value π
π¦ Author π¦
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
the whole squad really came together 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.!>!> 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).!>
ok so let me translate that for you because it's actually kind of gorgeous π
the matrix V stores the elementary reflectors H(i) in the i-th column below the diagonal. like, if M=5 and N=3, then:
V = ( 1 )
( v1 1 )
( v1 v2 1 )
( v1 v2 v3 )
( v1 v2 v3 )
the vi's are the vectors that define H(i), and they get returned in the matrix A. and the 1's along the diagonal of V? not stored in A. they're just implied, main character energy, they don't need to be written down π
then let K=MIN(M,N). the number of blocks is B = ceiling(K/NB), and each block is of order NB except the last one, which is of order IB = K - (B-1)*NB. for each of the B blocks a upper triangular block reflector factor gets computed: T1, T2, ..., TB. and 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 this:
T = (T1 T2 ... TB).
look at her. organized. compact. stunning. πβ¨
lowkey important: Definition at line 140 of file sgeqrt.f. that's where she lives, bestie π‘
β Author β
Generated automatically by Doxygen for LAPACK from the source code. so like, nobody hand-wrote this, the tooling did it, and honestly? respect. π€π
and that's the whole page!! LAPACK, Version 3.12.0, SRC/sgeqrt.f(3) β go forth and factorize your little heart out, bestie π
β¨ππ¦
π¦ 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