lamtsqr(3)
π NAME π
okay so bestie, welcome to lamtsqr(3) from the Library Functions Manual β¨. the NAME line is literally lamtsqr - lamtsqr: multiply by Q from latsqr, and that's the whole assignment: multiply by Q from latsqr. no cap, it's giving βQ is the main characterβ energy. π
β¨ SYNOPSIS β¨
π«Ά Functions π«Ά
subroutine clamtsqr (side, trans, m, n, k, mb, nb, a, lda, t, ldt, c, ldc, work, lwork, info)βCLAMTSQRsubroutine dlamtsqr (side, trans, m, n, k, mb, nb, a, lda, t, ldt, c, ldc, work, lwork, info)βDLAMTSQRsubroutine slamtsqr (side, trans, m, n, k, mb, nb, a, lda, t, ldt, c, ldc, work, lwork, info)βSLAMTSQRsubroutine zlamtsqr (side, trans, m, n, k, mb, nb, a, lda, t, ldt, c, ldc, work, lwork, info)βZLAMTSQR
π¦ Detailed Description π¦
this is the βDetailed Descriptionβ stop on the tour, and the original page keeps it cute and brief here. no extra parameters are hiding in the wings, bestie β the function lore is right below. π«Ά
π Function Documentation π
π subroutine clamtsqr
subroutine clamtsqr (character side, character trans, integer m, integer n,
integer k, integer mb, integer nb, complex, dimension( lda, * ) a,
integer lda, complex, dimension( ldt, * ) t, integer ldt, complex,
dimension( ldc, * ) c, integer ldc, complex, dimension( * ) work,
integer lwork, integer info)
CLAMTSQR
π Purpose
okay so CLAMTSQR overwrites the general complex M-by-N matrix C with:
SIDE = 'L' SIDE = 'R'
TRANS = 'N': Q * C C * Q
TRANS = 'C': Q**H * C C * Q**H
where Q is a complex unitary matrix defined as the product of blocked elementary reflectors computed by tall skinny QR factorization (CLATSQR). periodt. π
π Parameters
SIDEβSIDEisCHARACTER*1.= 'L': applyQorQ**Hfrom the Left;= 'R': applyQorQ**Hfrom the Right. π«ΆTRANSβTRANSisCHARACTER*1.= 'N': no transpose, applyQ;= 'C': Conjugate Transpose, applyQ**H. β¨MβMisINTEGER. The number of rows of the matrixA.M >=0.NβNisINTEGER. The number of columns of the matrixC.N >= 0.KβKisINTEGER. The number of elementary reflectors whose product defines the matrixQ.M >= K >= 0;MBβMBisINTEGER. The block size to be used in the blocked QR.MB > N.(must be the same asCLATSQR).NBβNBisINTEGER. The column block size to be used in the blocked QR.N >= NB >= 1.AβAisCOMPLEXarray, dimension(LDA,K). Thei-th column must contain the vector which defines the blocked elementary reflectorH(i), fori = 1,2,...,k, as returned byCLATSQRin the firstkcolumns of its array argumentA.LDAβLDAisINTEGER. The leading dimension of the arrayA. IfSIDE = 'L',LDA >= max(1,M); ifSIDE = 'R',LDA >= max(1,N).TβTisCOMPLEXarray, dimension( N * Number of blocks(CEIL(M-K/MB-K)),The blocked upper triangular block reflectors stored in compact form as a sequence of upper triangular blocks. See below for further details.LDTβLDTisINTEGER. The leading dimension of the arrayT.LDT >= NB.CβCisCOMPLEXarray, dimension(LDC,N). On entry, theM-by-NmatrixC. On exit,Cis overwritten byQ*CorQ**H*CorC*Q**HorC*Q.LDCβLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).WORKβ (workspace)COMPLEXarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the minimalLWORK.LWORKβLWORKisINTEGER. The dimension of the arrayWORK. IfMIN(M,N,K) = 0,LWORK >= 1. IfSIDE = 'L',LWORK >= max(1,N*NB). IfSIDE = 'R',LWORK >= max(1,MB*NB). IfLWORK = -1, then a workspace query is assumed; the routine only calculates the minimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA. π workspace query is doing its little thing, okay?INFOβINFOisINTEGER.= 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.
π Further Details
okay so Tall-Skinny QR (TSQR) performs QR by a sequence of unitary transformations, representing Q as a product of other unitary matrices:
Q = Q(1) * Q(2) * . . . * Q(k)
where each Q(i) zeros out subdiagonal entries of a block of MB rows of A:
Q(1) zeros out the subdiagonal entries of rows 1:MB of A
Q(2) zeros out the bottom MB-N rows of rows [1:N,MB+1:2*MB-N] of A
Q(3) zeros out the bottom MB-N rows of rows [1:N,2*MB-N+1:3*MB-2*N] of A
. . .
Q(1) is computed by GEQRT, which represents Q(1) by Householder vectors stored under the diagonal of rows 1:MB of A, and by upper triangular block reflectors, stored in array T(1:LDT,1:N). For more information see Further Details in GEQRT. β¨
Q(i) for i>1 is computed by TPQRT, which represents Q(i) by Householder vectors stored in rows [(i-1)*(MB-N)+N+1:i*(MB-N)+N] of A, and by upper triangular block reflectors, stored in array T(1:LDT,(i-1)*N+1:i*N). The last Q(k) may use fewer rows. For more information see Further Details in TPQRT.
For more details of the overall algorithm, see the description of Sequential TSQR in Section 2.2 of [1].
[1] βCommunication-Optimal Parallel and Sequential QR and LU Factorizations,β J. Demmel, L. Grigori, M. Hoemmen, J. Langou, SIAM J. Sci. Comput, vol. 34, no. 1, 2012
Definition at line 199 of file clamtsqr.f.
π subroutine dlamtsqr
subroutine dlamtsqr (character side, character trans, integer m, integer n,
integer k, integer mb, integer nb, double precision, dimension( lda, * )
a, integer lda, double precision, dimension( ldt, * ) t, integer ldt,
double precision, dimension( ldc, * ) c, integer ldc, double precision,
dimension( * ) work, integer lwork, integer info)
DLAMTSQR
π Purpose
okay so DLAMTSQR overwrites the general real M-by-N matrix C with:
SIDE = 'L' SIDE = 'R'
TRANS = 'N': Q * C C * Q
TRANS = 'T': Q**T * C C * Q**T
where Q is a real orthogonal matrix defined as the product of blocked elementary reflectors computed by tall skinny QR factorization (DLATSQR). slay. π₯
π Parameters
SIDEβSIDEisCHARACTER*1.= 'L': applyQorQ**Tfrom the Left;= 'R': applyQorQ**Tfrom the Right.TRANSβTRANSisCHARACTER*1.= 'N': no transpose, applyQ;= 'T': Transpose, applyQ**T.MβMisINTEGER. The number of rows of the matrixA.M >=0.NβNisINTEGER. The number of columns of the matrixC.N >= 0.KβKisINTEGER. The number of elementary reflectors whose product defines the matrixQ.M >= K >= 0;MBβMBisINTEGER. The block size to be used in the blocked QR.MB > N.(must be the same asDLATSQR).NBβNBisINTEGER. The column block size to be used in the blocked QR.N >= NB >= 1.AβAisDOUBLE PRECISIONarray, dimension(LDA,K). Thei-th column must contain the vector which defines the blocked elementary reflectorH(i), fori = 1,2,...,k, as returned byDLATSQRin the firstkcolumns of its array argumentA.LDAβLDAisINTEGER. The leading dimension of the arrayA. IfSIDE = 'L',LDA >= max(1,M); ifSIDE = 'R',LDA >= max(1,N).TβTisDOUBLE PRECISIONarray, dimension( N * Number of blocks(CEIL(M-K/MB-K)),The blocked upper triangular block reflectors stored in compact form as a sequence of upper triangular blocks. See below for further details.LDTβLDTisINTEGER. The leading dimension of the arrayT.LDT >= NB.CβCisDOUBLE PRECISIONarray, dimension(LDC,N). On entry, theM-by-NmatrixC. On exit,Cis overwritten byQ*CorQ**T*CorC*Q**TorC*Q.LDCβLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).WORKβ (workspace)DOUBLE PRECISIONarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the minimalLWORK.LWORKβLWORKisINTEGER. The dimension of the arrayWORK. IfMIN(M,N,K) = 0,LWORK >= 1. IfSIDE = 'L',LWORK >= max(1,N*NB). IfSIDE = 'R',LWORK >= max(1,MB*NB). IfLWORK = -1, then a workspace query is assumed; the routine only calculates the minimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA. πINFOβINFOisINTEGER.= 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. β that's the whole author squad, slay π«Ά
π« Further Details
okay bestie, THIS is the part that actually explains the whole TSQR vibe β Tall-Skinny QR does QR by stringing together a bunch of orthogonal transformations, and it doesn't store Q as one big chonky matrix. Nope. It represents Q as a product of other orthogonal matrices, like:
Q = Q(1) * Q(2) * . . . * Q(k)
and each Q(i) zeroes out the subdiagonal entries of a block of MB rows of A, one at a time:
Q(1) zeros out the subdiagonal entries of rows 1:MB of A
Q(2) zeros out the bottom MB-N rows of rows [1:N,MB+1:2*MB-N] of A
Q(3) zeros out the bottom MB-N rows of rows [1:N,2*MB-N+1:3*MB-2*N] of A
. . .
so Q(1) is the main character of the first block β¨ β it's computed by GEQRT, which represents Q(1) using Householder vectors stored under the diagonal of rows 1:MB of A, plus upper triangular block reflectors stored in the array T(1:LDT,1:N). Want the full tea? Check Further Details in GEQRT π
then Q(i) for i>1 is computed by TPQRT β that one represents Q(i) with Householder vectors stored in rows [(i-1)*(MB-N)+N+1:i*(MB-N)+N] of A, and with upper triangular block reflectors stored in the array T(1:LDT,(i-1)*N+1:i*N). Also fyi the last Q(k) may use fewer rows, because of course it can π More deets live in Further Details in TPQRT.
and if you want the whole algorithm spelled out? see the description of Sequential TSQR in Section 2.2 of [1] π
[1] βCommunication-Optimal Parallel and Sequential QR and LU Factorizations,β J. Demmel, L. Grigori, M. Hoemmen, J. Langou, SIAM J. Sci. Comput, vol. 34, no. 1, 2012
Definition at line 199 of file dlamtsqr.f.
π¦ subroutine slamtsqr (character side, character trans, integer m, integer n, integer k, integer mb, integer nb, real, dimension( lda, * ) a, integer lda, real, dimension( ldt, * ) t, integer ldt, real, dimension( ldc, * ) c, integer ldc, real, dimension( * ) work, integer lwork, integer info)
SLAMTSQR β periodt. π
β¨ Purpose
okay so SLAMTSQR overwrites the general real M-by-N matrix C with:
SIDE = 'L' SIDE = 'R'
TRANS = 'N': Q * C C * Q
TRANS = 'T': Q**T * C C * Q**T
where Q is a real orthogonal matrix defined as the product of blocked elementary reflectors computed by tall skinny QR factorization (SLATSQR) β iconic behavior, no cap π₯
πΈ Parameters
SIDEβSIDEisCHARACTER*1= 'L': applyQorQ**Tfrom the Left;= 'R': applyQorQ**Tfrom the Right.
TRANSβTRANSisCHARACTER*1= 'N': No transpose, applyQ;= 'T': Transpose, applyQ**T.
MβMisINTEGER. The number of rows of the matrixA.M >=0.NβNisINTEGER. The number of columns of the matrixC.N >= 0.KβKisINTEGER. The number of elementary reflectors whose product defines the matrixQ.M >= K >= 0;(yes bestie, that's a semicolon, it's just like that π)MBβMBisINTEGER. The block size to be used in the blocked QR.MB > N.(must be the same asSLATSQR) β οΈ like, actually the same, don't play with it.NBβNBisINTEGER. The column block size to be used in the blocked QR.N >= NB >= 1.AβAisREALarray, dimension(LDA,K). Thei-th column must contain the vector which defines the blockedelementary reflectorH(i), fori = 1,2,...,k, as returned bySLATSQRin the firstkcolumns of its array argumentA. πLDAβLDAisINTEGER. The leading dimension of the arrayA.- If
SIDE = 'L',LDA >= max(1,M); - if
SIDE = 'R',LDA >= max(1,N).
- If
TβTisREALarray, dimension( N * Number of blocks(CEIL(M-K/MB-K)),. The blocked upper triangular block reflectors stored in compact form as a sequence of upper triangular blocks. See below for further details. πLDTβLDTisINTEGER. The leading dimension of the arrayT.LDT >= NB.CβCisREALarray, dimension(LDC,N).- On entry, the
M-by-NmatrixC. - On exit,
Cis overwritten byQ*CorQ**T*CorC*Q**TorC*Q. bye original C, you had a good run π
- On entry, the
LDCβLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).WORKβ (workspace)REALarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the minimalLWORK. βLWORKβLWORKisINTEGER. The dimension of the arrayWORK.- If
MIN(M,N,K) = 0,LWORK >= 1. - If
SIDE = 'L',LWORK >= max(1,N*NB). - If
SIDE = 'R',LWORK >= max(1,MB*NB). - If
LWORK = -1, then a workspace query is assumed; the routine only calculates the minimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA. π«Ά classic query-mode behavior, we stan a non-scolding error path.
- If
INFOβINFOisINTEGER= 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.
π« Further Details
same TSQR situation as above, bestie β Tall-Skinny QR (TSQR) performs QR by a sequence of orthogonal transformations, representing Q as a product of other orthogonal matrices:
Q = Q(1) * Q(2) * . . . * Q(k)
where each Q(i) zeros out subdiagonal entries of a block of MB rows of A:
Q(1) zeros out the subdiagonal entries of rows 1:MB of A
Q(2) zeros out the bottom MB-N rows of rows [1:N,MB+1:2*MB-N] of A
Q(3) zeros out the bottom MB-N rows of rows [1:N,2*MB-N+1:3*MB-2*N] of A
. . .
Q(1) is computed by GEQRT, which represents Q(1) by Householder vectors stored under the diagonal of rows 1:MB of A, and by upper triangular block reflectors, stored in array T(1:LDT,1:N). For more information see Further Details in GEQRT. π
Q(i) for i>1 is computed by TPQRT, which represents Q(i) by Householder vectors stored in rows [(i-1)*(MB-N)+N+1:i*(MB-N)+N] of A, and by upper triangular block reflectors, stored in array T(1:LDT,(i-1)*N+1:i*N). The last Q(k) may use fewer rows. For more information see Further Details in TPQRT. π
For more details of the overall algorithm, see the description of Sequential TSQR in Section 2.2 of [1].
[1] βCommunication-Optimal Parallel and Sequential QR and LU Factorizations,β J. Demmel, L. Grigori, M. Hoemmen, J. Langou, SIAM J. Sci. Comput, vol. 34, no. 1, 2012
Definition at line 199 of file slamtsqr.f.
π subroutine zlamtsqr (character side, character trans, integer m, integer n, integer k, integer mb, integer nb, complex*16, dimension( lda, * ) a, integer lda, complex*16, dimension( ldt, * ) t, integer ldt, complex*16, dimension( ldc, * ) c, integer ldc, complex*16, dimension( * ) work, integer lwork, integer info)
ZLAMTSQR β the complex one, and she's gorgeous π β¨
β¨ Purpose
okay so ZLAMTSQR overwrites the general complex M-by-N matrix C with:
SIDE = 'L' SIDE = 'R'
TRANS = 'N': Q * C C * Q
TRANS = 'C': Q**H * C C * Q**H
where Q is a complex unitary matrix defined as the product of blocked elementary reflectors computed by tall skinny QR factorization (ZLATSQR). notice the transpose option is 'C' here and it's the conjugate transpose β that's the whole difference, and it eats π₯
πΈ Parameters
SIDEβSIDEisCHARACTER*1= 'L': applyQorQ**Hfrom the Left;= 'R': applyQorQ**Hfrom the Right.
TRANSβTRANSisCHARACTER*1= 'N': No transpose, applyQ;= 'C': Conjugate Transpose, applyQ**H.
MβMisINTEGER. The number of rows of the matrixA.M >=0.NβNisINTEGER. The number of columns of the matrixC.N >= 0.KβKisINTEGER. The number of elementary reflectors whose product defines the matrixQ.M >= K >= 0;MBβMBisINTEGER. The block size to be used in the blocked QR.MB > N.(must be the same asZLATSQR) β οΈ same rule as always, bestie.NBβNBisINTEGER. The column block size to be used in the blocked QR.N >= NB >= 1.AβAisCOMPLEX*16array, dimension(LDA,K). Thei-th column must contain the vector which defines the blockedelementary reflectorH(i), fori = 1,2,...,k, as returned byZLATSQRin the firstkcolumns of its array argumentA. π¦LDAβLDAisINTEGER. The leading dimension of the arrayA.- If
SIDE = 'L',LDA >= max(1,M); - if
SIDE = 'R',LDA >= max(1,N).
- If
TβTisCOMPLEX*16array, dimension( N * Number of blocks(CEIL(M-K/MB-K)),. The blocked upper triangular block reflectors stored in compact form as a sequence of upper triangular blocks. See below for further details. πLDTβLDTisINTEGER. The leading dimension of the arrayT.LDT >= NB.CβCisCOMPLEX*16array, dimension(LDC,N).- On entry, the
M-by-NmatrixC. - On exit,
Cis overwritten byQ*CorQ**H*CorC*Q**HorC*Q. she got rewritten, it's giving main character energy π
- On entry, the
LDCβLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).WORK- (workspace)
COMPLEX*16 array, dimension (MAX(1,LWORK))β on exit, ifINFO = 0, thenWORK(1)returns the minimalLWORK. β¨
πΈ LWORK πΈ
Okay so LWORK is INTEGER β itβs the dimension of the array WORK, and the size rules are very much giving exact math, no cap:
- If
MIN(M,N,K) = 0, thenLWORK >= 1. - If
SIDE = 'L', thenLWORK >= max(1,N*NB). - If
SIDE = 'R', thenLWORK >= max(1,MB*NB).
If LWORK = -1, then a workspace query is assumed; the routine only calculates the minimal 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, and bestie, itβs literally just the vibe check at the end:
= 0: successful exit π< 0: ifINFO = -i, the i-th argument had an illegal value π
π Author π
The legends behind this one are:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π₯ Further Details: π₯
Tall-Skinny QR (TSQR) performs QR by a sequence of unitary transformations, representing Q as a product of other unitary matrices:
Q = Q(1) * Q(2) * . . . * Q(k)
where each Q(i) zeros out subdiagonal entries of a block of MB rows of A:
Q(1) zeros out the subdiagonal entries of rows 1:MB of A
Q(2) zeros out the bottom MB-N rows of rows [1:N,MB+1:2*MB-N] of A
Q(3) zeros out the bottom MB-N rows of rows [1:N,2*MB-N+1:3*MB-2*N] of A
. . .
Q(1) is computed by GEQRT, which represents Q(1) by Householder vectors stored under the diagonal of rows 1:MB of A, and by upper triangular block reflectors, stored in array T(1:LDT,1:N). For more information see Further Details in GEQRT. π«Ά
Q(i) for i>1 is computed by TPQRT, which represents Q(i) by Householder vectors stored in rows [(i-1)*(MB-N)+N+1:i*(MB-N)+N] of A, and by upper triangular block reflectors, stored in array T(1:LDT,(i-1)*N+1:i*N). The last Q(k) may use fewer rows. For more information see Further Details in TPQRT. π
For more details of the overall algorithm, see the description of Sequential TSQR in Section 2.2 of [1].
[1] βCommunication-Optimal Parallel and Sequential QR and LU Factorizations,β J. Demmel, L. Grigori, M. Hoemmen, J. Langou, SIAM J. Sci. Comput, vol. 34, no. 1, 2012
Definition at line 199 of file zlamtsqr.f.
π€ Author π€
Generated automatically by Doxygen for LAPACK from the source code.
Final footer vibes: source/version is LAPACK Version 3.12.0, page is lamtsqr(3), and the date is whatever the generated Doxygen footer stamped β no separate date is shown in this footer. πππ¦
π¦ 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