/home/abui...RC/cgeqr.f(3)
π NAME
ok so this is the manual page for /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/cgeqr.f β yes that whole entire path, she's got a long name and she's iconic for it. It lives in the Library Functions Manual (that's the manual name, bestie, now you know) and it's the home of CGEQR, the subroutine that does your complex QR factorization. π
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine CGEQR (m, n, a, lda, t, tsize, work, lwork, info)β CGEQR. that's her. that's the whole vibe.
π Function/Subroutine Documentation π
subroutine CGEQR (integer m, integer n, complex, dimension( lda, * ) a,
integer lda, complex, dimension( * ) t, integer tsize, complex,
dimension( * ) work, integer lwork, integer info)
CGEQR (again, still her π )
Purpose:
ok so, straight from the source, with the !> comment markers and all because we keep it exact:
!>
!> CGEQR computes a QR factorization of a complex M-by-N matrix A:
!>
!> A = Q * ( R ),
!> ( 0 )
!>
!> where:
!>
!> Q is a M-by-M orthogonal matrix;
!> R is an upper-triangular N-by-N matrix;
!> 0 is a (M-N)-by-N zero matrix, if M > N.
!>
!>
like she literally splits your matrix into a Q (M-by-M orthogonal, v fancy) times an R stacked on top of a block of zeros. the zero block is (M-N)-by-N and only shows up if M > N. slay. π₯
πΈ Parameters πΈ
MβMis INTEGER, and it's the number of rows of the matrixA. rule:M >= 0.
!> M is INTEGER
!> The number of rows of the matrix A. M >= 0.
!>
NβNis INTEGER, the number of columns of the matrixA. rule:N >= 0.
!> N is INTEGER
!> The number of columns of the matrix A. N >= 0.
!>
AβAis COMPLEX array, dimension(LDA,N). On entry it's your M-by-N matrixA. On exit, the elements on and above the diagonal hold themin(M,N)-by-N upper trapezoidal matrixR(andRis upper triangular ifM >= N), while the elements below the diagonal get used to store part of the data structure that representsQ. so like, don't go messing with the lower part, it's booked. π
!> A is COMPLEX array, dimension (LDA,N)
!> On entry, the M-by-N matrix A.
!> On exit, the elements on and above the diagonal of the array
!> contain the min(M,N)-by-N upper trapezoidal matrix R
!> (R is upper triangular if M >= N);
!> the elements below the diagonal are used to store part of the
!> data structure to represent Q.
!>
LDAβLDAis INTEGER, the leading dimension of the arrayA. rule:LDA >= max(1,M).
!> LDA is INTEGER
!> The leading dimension of the array A. LDA >= max(1,M).
!>
TβTis COMPLEX array, dimension(MAX(5,TSIZE)). On exit, ifINFO = 0, thenT(1)returns the optimal TSIZE (or either the minimal or optimal one, if a query is being assumed) β seeTSIZEfor the deets. The rest ofTcontains part of the data structure used to representQ. so if you wanna apply or constructQ, you literally have to keepT(alongsideA, yes both) and pass it along to further subroutines. don't lose her. π«Ά
!> T is COMPLEX array, dimension (MAX(5,TSIZE))
!> On exit, if INFO = 0, T(1) returns optimal (or either minimal
!> or optimal, if query is assumed) TSIZE. See TSIZE for details.
!> Remaining T contains part of the data structure used to represent Q.
!> If one wants to apply or construct Q, then one needs to keep T
!> (in addition to A) and pass it to further subroutines.
!>
TSIZEβTSIZEis INTEGER. Here's the tea:- If
TSIZE >= 5, it's the dimension of the arrayT. - If
TSIZE = -1or-2, then a workspace query is assumed. The routine only calculates the sizes of theTandWORKarrays, returns those values as the first entries of theTandWORKarrays, and no error message related toTorWORKis issued byXERBLA. - If
TSIZE = -1, the routine calculates the optimal size ofTfor the optimum performance and returns this value inT(1). - If
TSIZE = -2, the routine calculates the minimal size ofTand returns this value inT(1).
- If
!> TSIZE is INTEGER
!> If TSIZE >= 5, the dimension of the array T.
!> If TSIZE = -1 or -2, then a workspace query is assumed. The routine
!> only calculates the sizes of the T and WORK arrays, returns these
!> values as the first entries of the T and WORK arrays, and no error
!> message related to T or WORK is issued by XERBLA.
!> If TSIZE = -1, the routine calculates optimal size of T for the
!> optimum performance and returns this value in T(1).
!> If TSIZE = -2, the routine calculates minimal size of T and
!> returns this value in T(1).
!>
WORKβ(workspace)COMPLEX array, dimension(MAX(1,LWORK)). On exit, ifINFO = 0, thenWORK(1)contains the optimal LWORK (or either minimal or optimal, if a query was assumed). SeeLWORKfor details. β¨
!> (workspace) COMPLEX array, dimension (MAX(1,LWORK))
!> On exit, if INFO = 0, WORK(1) contains optimal (or either minimal
!> or optimal, if query was assumed) LWORK.
!> See LWORK for details.
!>
LWORKβLWORKis INTEGER, the dimension of the arrayWORK. Same energy asTSIZE, honestly:- If
LWORK = -1or-2, then a workspace query is assumed. The routine only calculates the sizes of theTandWORKarrays, returns those values as the first entries of theTandWORKarrays, and no error message related toTorWORKis issued byXERBLA. - If
LWORK = -1, the routine calculates the optimal size ofWORKfor the optimal performance and returns this value inWORK(1). - If
LWORK = -2, the routine calculates the minimal size ofWORKand returns this value inWORK(1).
- If
!> LWORK is INTEGER
!> The dimension of the array WORK.
!> If LWORK = -1 or -2, then a workspace query is assumed. The routine
!> only calculates the sizes of the T and WORK arrays, returns these
!> values as the first entries of the T and WORK arrays, and no error
!> message related to T or WORK is issued by XERBLA.
!> If LWORK = -1, the routine calculates optimal size of WORK for the
!> optimal performance and returns this value in WORK(1).
!> If LWORK = -2, the routine calculates minimal size of WORK and
!> returns this value in WORK(1).
!>
INFOβINFOis INTEGER, the status report bestie:= 0: successful exit π< 0: ifINFO = -i, thei-th argument had an illegal value π
!> INFO is INTEGER
!> = 0: successful exit
!> < 0: if INFO = -i, the i-th argument had an illegal value
!>
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
all of them. collectively. it takes a village, fr fr. π«Ά
π¦ Further Details π¦
!>
!> The goal of the interface is to give maximum freedom to the developers for
!> creating any QR factorization algorithm they wish. The triangular
!> (trapezoidal) R has to be stored in the upper part of A. The lower part of A
!> and the array T can be used to store any relevant information for applying or
!> constructing the Q factor. The WORK array can safely be discarded after exit.
!>
!> Caution: One should not expect the sizes of T and WORK to be the same from one
!> LAPACK implementation to the other, or even from one execution to the other.
!> A workspace query (for T and WORK) is needed at each execution. However,
!> for a given execution, the size of T and WORK are fixed and will not change
!> from one query to the next.
!>
!>
so basically: the interface is giving maximum freedom to developers to make whatever QR factorization algorithm they want. R (triangular/trapezoidal) has to live in the upper part of A. The lower part of A plus the array T are fair game for storing whatever info you need to apply or construct Q. And WORK? you can safely throw it away after exit, she doesn't need to stay. ποΈ
β οΈ Caution, read this part twice: do NOT expect the sizes ofTandWORKto be the same across LAPACK implementations, or even between one execution and another. A workspace query (forTandWORK) is needed at each execution. That said β for a given execution, the sizes ofTandWORKare fixed and won't change from one query to the next. π
π§ Further Details particular to this LAPACK implementation: π§
!>
!> These details are particular for this LAPACK implementation. Users should not
!> take them for granted. These details may change in the future, and are not likely
!> true for another LAPACK implementation. These details are relevant if one wants
!> to try to understand the code. They are not part of the interface.
!>
!> In this version,
!>
!> T(2): row block size (MB)
!> T(3): column block size (NB)
!> T(6:TSIZE): data structure needed for Q, computed by
!> CLATSQR or CGEQRT
!>
!> Depending on the matrix dimensions M and N, and row and column
!> block sizes MB and NB returned by ILAENV, CGEQR will use either
!> CLATSQR (if the matrix is tall-and-skinny) or CGEQRT to compute
!> the QR factorization.
!>
!>
translation bestie: these deets are specific to this LAPACK implementation. Do not take them for granted, ok? They may change in the future and they're probably not true for another LAPACK implementation. They're only relevant if you're trying to understand the code β they are not part of the interface. π ββοΈ
In this version:
T(2): row block size (MB)T(3): column block size (NB)T(6:TSIZE): data structure needed forQ, computed byCLATSQRorCGEQRT
Depending on the matrix dimensions M and N, and the row and column block sizes MB and NB returned by ILAENV, CGEQR will use either CLATSQR (if the matrix is tall-and-skinny) or CGEQRT to compute the QR factorization. tall-and-skinny representation!! π
Definition at line 174 of file cgeqr.f.
β Author β
Generated automatically by Doxygen for LAPACK from the source code.
and that's the whole page, babes π β this one's from LAPACK, Version 3.12.0, courtesy of /home/abui...RC/cgeqr.f(3). go forth and factorize responsibly. πβ¨
π¦ 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