/home/abui...RC/cgeqr.f(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’… 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 β€” M is INTEGER, and it's the number of rows of the matrix A. rule: M >= 0.
!>          M is INTEGER
!>          The number of rows of the matrix A.  M >= 0.
!>
  • N β€” N is INTEGER, the number of columns of the matrix A. rule: N >= 0.
!>          N is INTEGER
!>          The number of columns of the matrix A.  N >= 0.
!>
  • A β€” A is COMPLEX array, dimension (LDA,N). On entry it's your M-by-N matrix A. On exit, the elements on and above the diagonal hold the min(M,N)-by-N upper trapezoidal matrix R (and R is upper triangular if M >= N), while the elements below the diagonal get used to store part of the data structure that represents Q. 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 β€” LDA is INTEGER, the leading dimension of the array A. rule: LDA >= max(1,M).
!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>
  • T β€” T is COMPLEX array, dimension (MAX(5,TSIZE)). On exit, if INFO = 0, then T(1) returns the optimal TSIZE (or either the minimal or optimal one, if a query is being assumed) β€” see TSIZE for the deets. The rest of T contains part of the data structure used to represent Q. so if you wanna apply or construct Q, you literally have to keep T (alongside A, 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 β€” TSIZE is INTEGER. Here's the tea:
    • If TSIZE >= 5, it's 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 those 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 the optimal size of T for the optimum performance and returns this value in T(1).
    • If TSIZE = -2, the routine calculates the minimal size of T and returns this value in T(1).
!>          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, if INFO = 0, then WORK(1) contains the optimal LWORK (or either minimal or optimal, if a query was assumed). See LWORK for 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 β€” LWORK is INTEGER, the dimension of the array WORK. Same energy as TSIZE, honestly:
    • If LWORK = -1 or -2, then a workspace query is assumed. The routine only calculates the sizes of the T and WORK arrays, returns those 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 the optimal size of WORK for the optimal performance and returns this value in WORK(1).
    • If LWORK = -2, the routine calculates the minimal size of WORK and returns this value in WORK(1).
!>          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 β€” INFO is INTEGER, the status report bestie:
    • = 0: successful exit πŸŽ‰
    • < 0: if INFO = -i, the i-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 of T and WORK to be the same across LAPACK implementations, or even between one execution and another. A workspace query (for T and WORK) is needed at each execution. That said β€” for a given execution, the sizes of T and WORK are 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 for Q, computed by CLATSQR or CGEQRT

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