getsqrhrt(3)
π NAME π
getsqrhrt β and yes bestie, the manual page is literally called getsqrhrt(3) (Library Functions Manual), so that's the whole vibe. What it does: tall-skinny QR factor, with Householder reconstruction. That's it, that's the function π«Ά
π¦ SYNOPSIS π¦
β¨ Functions β¨
Four flavors, one for each letter of the alphabet you actually care about, all with the same argument list. Pick your data type and go π
subroutine cgetsqrhrt (m, n, mb1, nb1, nb2, a, lda, t, ldt, work, lwork, info)β theCOMPLEXone, akaCGETSQRHRTsubroutine dgetsqrhrt (m, n, mb1, nb1, nb2, a, lda, t, ldt, work, lwork, info)β theDOUBLE PRECISIONone, akaDGETSQRHRTsubroutine sgetsqrhrt (m, n, mb1, nb1, nb2, a, lda, t, ldt, work, lwork, info)β theREALone, akaSGETSQRHRTsubroutine zgetsqrhrt (m, n, mb1, nb1, nb2, a, lda, t, ldt, work, lwork, info)β theCOMPLEX*16one, akaZGETSQRHRT
Written out long, the signatures are exactly:
subroutine cgetsqrhrt (m, n, mb1, nb1, nb2, a, lda, t, ldt, work, lwork,
info)
subroutine dgetsqrhrt (m, n, mb1, nb1, nb2, a, lda, t, ldt, work, lwork,
info)
subroutine sgetsqrhrt (m, n, mb1, nb1, nb2, a, lda, t, ldt, work, lwork,
info)
subroutine zgetsqrhrt (m, n, mb1, nb1, nb2, a, lda, t, ldt, work, lwork,
info)
π Detailed Description π
Hi bestie, this section is just vibes and a promise: the actual details live down in Function Documentation π
π Function Documentation π
β cgetsqrhrt β
subroutine cgetsqrhrt (integer m, integer n, integer mb1, integer nb1,
integer nb2, complex, dimension( lda, * ) a, integer lda, complex,
dimension( ldt, * ) t, integer ldt, complex, dimension( * ) work,
integer lwork, integer info)
CGETSQRHRT β iconic name, iconic routine π
πΈ Purpose πΈ
CGETSQRHRT computes a NB2-sized column blocked QR-factorization of a COMPLEX M-by-N matrix A with M >= N, so:
A = Q * R.
Internally it uses a NB1-sized column blocked and MB1-sized row blocked TSQR-factorization, and it performs the reconstruction of the Householder vectors from the TSQR output. It also converts the R_tsqr factor from the TSQR-factorization output into the R factor that corresponds to the Householder QR-factorization:
A = Q_tsqr * R_tsqr = Q * R.
The output Q and R factors are stored in the same format as in CGEQRT (Q is in blocked compact WY-representation). Go read the CGEQRT docs if you want the full lore on that format π
π¦ Parameters π¦
MβM is INTEGER. The number of rows of the matrixA.M >= 0.NβN is INTEGER. The number of columns of the matrixA.M >= N >= 0.MB1βMB1 is INTEGER. The row block size to be used in the blocked TSQR.MB1 > N.NB1βNB1 is INTEGER. The column block size to be used in the blocked TSQR.N >= NB1 >= 1.NB2βNB2 is INTEGER. The block size to be used in the blocked QR that is output.NB2 >= 1.AβA is COMPLEX*16 array, dimension (LDA,N).- On entry: an
M-by-NmatrixA. - On exit:
- a) the elements on and above the diagonal of the array contain the
N-by-Nupper-triangular matrixRcorresponding to the Householder QR; - b) the elements below the diagonal represent
Qby the columns of blockedV(compact WY-representation).
- a) the elements on and above the diagonal of the array contain the
- On entry: an
LDAβLDA is INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).TβT is COMPLEX array, dimension (LDT,N)). The upper triangular block reflectors stored in compact form as a sequence of upper triangular blocks.LDTβLDT is INTEGER. The leading dimension of the arrayT.LDT >= NB2.WORKβ(workspace) COMPLEX array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβLWORK is INTEGER. The dimension of the arrayWORK.
If MIN(M,N) = 0, LWORK >= 1, else
LWORK >= MAX( 1, LWT + LW1, MAX( LWT+N*N+LW2, LWT+N*N+N ) ),
where
NUM_ALL_ROW_BLOCKS = CEIL((M-N)/(MB1-N)),
NB1LOCAL = MIN(NB1,N).
LWT = NUM_ALL_ROW_BLOCKS * N * NB1LOCAL,
LW1 = NB1LOCAL * N,
LW2 = NB1LOCAL * MAX( NB1LOCAL, ( N - NB1LOCAL ) ).
If LWORK = -1, then a workspace query is assumed. The routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA π
INFOβINFO is INTEGER= 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.
π Contributors: π
November 2020, Igor Kozachenko, Computer Science Division, University of California, Berkeley
Definition at line 180 of file cgetsqrhrt.f.
β dgetsqrhrt β
subroutine dgetsqrhrt (integer m, integer n, integer mb1, integer nb1,
integer nb2, double precision, dimension( lda, * ) a, integer lda,
double precision, dimension( ldt, * ) t, integer ldt, double precision,
dimension( * ) work, integer lwork, integer info)
DGETSQRHRT β same energy, double the precision π
πΈ Purpose πΈ
DGETSQRHRT computes a NB2-sized column blocked QR-factorization of a DOUBLE PRECISION M-by-N matrix A with M >= N, so:
A = Q * R.
Internally it uses a NB1-sized column blocked and MB1-sized row blocked TSQR-factorization, and it performs the reconstruction of the Householder vectors from the TSQR output. It also converts the R_tsqr factor from the TSQR-factorization output into the R factor that corresponds to the Householder QR-factorization:
A = Q_tsqr * R_tsqr = Q * R.
The output Q and R factors are stored in the same format as in DGEQRT (Q is in blocked compact WY-representation). See the documentation of DGEQRT for more details on the format π
π¦ Parameters π¦
MβM is INTEGER. The number of rows of the matrixA.M >= 0.NβN is INTEGER. The number of columns of the matrixA.M >= N >= 0.MB1βMB1 is INTEGER. The row block size to be used in the blocked TSQR.MB1 > N.NB1βNB1 is INTEGER. The column block size to be used in the blocked TSQR.N >= NB1 >= 1.NB2βNB2 is INTEGER. The block size to be used in the blocked QR that is output.NB2 >= 1.AβA is DOUBLE PRECISION array, dimension (LDA,N).- On entry: an
M-by-NmatrixA. - On exit:
- a) the elements on and above the diagonal of the array contain the
N-by-Nupper-triangular matrixRcorresponding to the Householder QR; - b) the elements below the diagonal represent
Qby the columns of blockedV(compact WY-representation).
- a) the elements on and above the diagonal of the array contain the
- On entry: an
LDAβLDA is INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).TβT is DOUBLE PRECISION array, dimension (LDT,N)). The upper triangular block reflectors stored in compact form as a sequence of upper triangular blocks.LDTβLDT is INTEGER. The leading dimension of the arrayT.LDT >= NB2.WORKβ(workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβLWORK is INTEGER. The dimension of the arrayWORK.
If MIN(M,N) = 0, LWORK >= 1, else
LWORK >= MAX( 1, LWT + LW1, MAX( LWT+N*N+LW2, LWT+N*N+N ) ),
where
NUM_ALL_ROW_BLOCKS = CEIL((M-N)/(MB1-N)),
NB1LOCAL = MIN(NB1,N).
LWT = NUM_ALL_ROW_BLOCKS * N * NB1LOCAL,
LW1 = NB1LOCAL * N,
LW2 = NB1LOCAL * MAX( NB1LOCAL, ( N - NB1LOCAL ) ).
If LWORK = -1, then a workspace query is assumed. The routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA
INFOβINFO is INTEGER= 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.
π Contributors: π
November 2020, Igor Kozachenko, Computer Science Division, University of California, Berkeley
Definition at line 180 of file dgetsqrhrt.f.
β sgetsqrhrt β
subroutine sgetsqrhrt (integer m, integer n, integer mb1, integer nb1,
integer nb2, real, dimension( lda, * ) a, integer lda, real, dimension(
ldt, * ) t, integer ldt, real, dimension( * ) work, integer lwork,
integer info)
SGETSQRHRT β the single-precision bestie, same icon behavior π
πΈ Purpose πΈ
SGETSQRHRT computes a NB2-sized column blocked QR-factorization of a COMPLEX M-by-N matrix A with M >= N, so:
A = Q * R.
Internally it uses a NB1-sized column blocked and MB1-sized row blocked TSQR-factorization, and it performs the reconstruction of the Householder vectors from the TSQR output. It also converts the R_tsqr factor from the TSQR-factorization output into the R factor that corresponds to the Householder QR-factorization:
A = Q_tsqr * R_tsqr = Q * R.
The output Q and R factors are stored in the same format as in SGEQRT (Q is in blocked compact WY-representation). See the documentation of SGEQRT for more details on the format π§
π¦ Parameters π¦
MβM is INTEGER. The number of rows of the matrixA.M >= 0.N
N β INTEGER β¨ this is how many columns your matrix A has, and the vibe check is M >= N >= 0. No empty-columns erasure, no over-stuffed matrix, we stay in range bestie π«Ά
MB1 β INTEGER πΈ the row block size used in the blocked TSQR, and the rule is strict: MB1 > N. Bigger than N, or she's not coming to the party π
NB1 β INTEGER π the column block size used in the blocked TSQR, with N >= NB1 >= 1. Snug inside range, no cap.
NB2 β INTEGER π¦ the block size used in the blocked QR that is output. NB2 >= 1. This is the one that actually shows up to the group chat, so she matters π
A β REAL array, dimension (LDA,N) π
- On entry: an
M-by-NmatrixA. Fresh out the box. - On exit:
- a) the elements on and above the diagonal of the array contain the
N-by-Nupper-triangular matrixRcorresponding to the Householder QR π iconic - b) the elements below the diagonal represent
Qby the columns of blockedV(compact WY-representation) π₯
- a) the elements on and above the diagonal of the array contain the
LDA β INTEGER π the leading dimension of the array A. Requirement: LDA >= max(1,M). That max(1,M) is lowkey doing the Lord's work, respect it π
T β REAL array, dimension (LDT,N)) π the upper triangular block reflectors stored in compact form as a sequence of upper triangular blocks. Reflectors, but make it compact β¨
LDT β INTEGER β the leading dimension of the array T. LDT >= NB2. Just enough room for NB2 and not a crumb more.
WORK β (workspace) REAL array, dimension (MAX(1,LWORK)) π§ this is the behind-the-scenes bestie. On exit, if INFO = 0, WORK(1) returns the optimal LWORK. She's not just working, she's reporting π
LWORK β INTEGER π the dimension of the array WORK. The sizing is a whole thing, so buckle up:
LWORK >= MAX( 1, LWT + LW1, MAX( LWT+N*N+LW2, LWT+N*N+N ) ),
where
NUM_ALL_ROW_BLOCKS = CEIL((M-N)/(MB1-N)),
NB1LOCAL = MIN(NB1,N).
LWT = NUM_ALL_ROW_BLOCKS * N * NB1LOCAL,
LW1 = NB1LOCAL * N,
LW2 = NB1LOCAL * MAX( NB1LOCAL, ( N - NB1LOCAL ) ).
And if MIN(M,N) = 0, then it's just LWORK >= 1 and we move on, no drama πΈ
Workspace query era: ifLWORK = -1, a workspace query is assumed. The routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued by XERBLA. It's giving "I'll tell you how much room I need, but I won't yell at you for asking" π«Ά
INFO β INTEGER π the status report:
= 0: successful exit π slay< 0: ifINFO = -i, thei-th argument had an illegal value π¨ (this is your villain origin story, go fix argumenti)
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Contributors:
November 2020, Igor Kozachenko, Computer Science Division, University of California, Berkeley
Definition at line 180 of file sgetsqrhrt.f.
π subroutine zgetsqrhrt β the COMPLEX*16 remix
Okay so you thought the real version was the whole story? Enter the complex girlies β¨ Same routine, same energy, but everything is COMPLEX*16 now.
subroutine zgetsqrhrt (integer m, integer n, integer mb1, integer nb1,
integer nb2, complex*16, dimension( lda, * ) a, integer lda, complex*16,
dimension( ldt, * ) t, integer ldt, complex*16, dimension( * ) work,
integer lwork, integer info)
ZGETSQRHRT π
π Purpose:
ZGETSQRHRT computes a NB2-sized column blocked QR-factorization of a complex M-by-N matrix A with M >= N,
A = Q * R.
The routine uses internally a NB1-sized column blocked and MB1-sized row blocked TSQR-factorization and performs the reconstruction of the Householder vectors from the TSQR output π₯ The routine also converts the R_tsqr factor from the TSQR-factorization output into the R factor that corresponds to the Householder QR-factorization,
A = Q_tsqr * R_tsqr = Q * R.
The output Q and R factors are stored in the same format as in ZGEQRT (Q is in blocked compact WY-representation) π See the documentation of ZGEQRT for more details on the format. iykyk π
β¨ Parameters
M β INTEGER πΈ the number of rows of the matrix A. M >= 0.
N β INTEGER π¦ the number of columns of the matrix A. M >= N >= 0.
MB1 β INTEGER π the row block size to be used in the blocked TSQR. MB1 > N.
NB1 β INTEGER β the column block size to be used in the blocked TSQR. N >= NB1 >= 1.
NB2 β INTEGER π the block size to be used in the blocked QR that is output. NB2 >= 1.
A β COMPLEX*16 array, dimension (LDA,N) π
- On entry: an
M-by-NmatrixA. - On exit:
- a) the elements on and above the diagonal of the array contain the
N-by-Nupper-triangular matrixRcorresponding to the Householder QR - b) the elements below the diagonal represent
Qby the columns of blockedV(compact WY-representation)
- a) the elements on and above the diagonal of the array contain the
LDA β INTEGER π the leading dimension of the array A. LDA >= max(1,M).
T β COMPLEX*16 array, dimension (LDT,N)) π the upper triangular block reflectors stored in compact form as a sequence of upper triangular blocks.
LDT β INTEGER β the leading dimension of the array T. LDT >= NB2.
WORK β (workspace) COMPLEX*16 array, dimension (MAX(1,LWORK)) π§ on exit, if INFO = 0, WORK(1) returns the optimal LWORK.
LWORK β INTEGER π the dimension of the array WORK. If MIN(M,N) = 0, LWORK >= 1, else:
LWORK >= MAX( 1, LWT + LW1, MAX( LWT+N*N+LW2, LWT+N*N+N ) ),
where
NUM_ALL_ROW_BLOCKS = CEIL((M-N)/(MB1-N)),
NB1LOCAL = MIN(NB1,N).
LWT = NUM_ALL_ROW_BLOCKS * N * NB1LOCAL,
LW1 = NB1LOCAL * N,
LW2 = NB1LOCAL * MAX( NB1LOCAL, ( N - NB1LOCAL ) ).
IfLWORK = -1, then a workspace query is assumed. The routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued by XERBLA π
INFO β INTEGER π
= 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.
π Contributors:
November 2020, Igor Kozachenko, Computer Science Division, University of California, Berkeley
Definition at line 180 of file zgetsqrhrt.f.
π Author
Generated automatically by Doxygen for LAPACK from the source code π (yes, the docs were auto-generated, and honestly? She ate.)
That's the whole page bestie π«Ά LAPACK, Version 3.12.0, getsqrhrt(3) β go forth and block your QR factorizations responsibly, mwah πβ¨π
π¦ 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