SRC/cungqr.f(3)

πŸ¦‹ SRC/cungqr.f β€” from the Library Functions Manual (yes bestie, we're reading manpages now)

okay so picture this: it's a .f file, it's giving fortran, it's giving linear algebra royalty, and it lives in the Library Functions Manual. come sit with me πŸ’…


✨ NAME ✨

SRC/cungqr.f β€” that's the icon, that's the file, that's the whole vibe. no cap.


🌸 SYNOPSIS 🌸

Functions/Subroutines

subroutine cungqr (m, n, k, a, lda, tau, work, lwork, info)
    CUNGQR

like… the signature alone is main character energy 🫢


πŸ‘‘ Function/Subroutine Documentation πŸ‘‘

subroutine cungqr

subroutine cungqr (integer m, integer n, integer k, complex, dimension( lda, * ) a,
                   integer lda, complex, dimension( * ) tau, complex, dimension( * ) work,
                   integer lwork, integer info)
    CUNGQR

πŸ’– Purpose:

!>
!> CUNGQR generates an M-by-N complex matrix Q with orthonormal columns,
!> which is defined as the first N columns of a product of K elementary
!> reflectors of order M
!>
!>       Q  =  H(1) H(2) . . . H(k)
!>
!> as returned by CGEQRF.
!>

so basically: CUNGQR builds you an M-by-N complex matrix Q with orthonormal columns, and it's literally defined as the first N columns of a product of K elementary reflectors of order M β€” the exact ones CGEQRF handed you. the way that math just works 😭✨


🌈 Parameters 🌈

  • M β€” M is INTEGER, and it's the number of rows of the matrix Q. requirement: M >= 0. no negative rows bestie, that's not a thing πŸ™ˆ
  • N β€” N is INTEGER, the number of columns of the matrix Q. requirement: M >= N >= 0. yes the order matters, it's a whole sandwich πŸ₯ͺ
  • K β€” K is INTEGER, the number of elementary reflectors whose product defines the matrix Q. requirement: N >= K >= 0. another sandwich, we love consistency.
  • A β€” A is COMPLEX array, dimension (LDA,N). on entry, the i-th column must contain the vector which defines the elementary reflector H(i), for i = 1,2,...,k, exactly as returned by CGEQRF in the first k columns of its array argument A. on exit? it's the M-by-N matrix Q. glow-up arc, honestly πŸ”₯
  • LDA β€” LDA is INTEGER, the first dimension of the array A. requirement: LDA >= max(1,M). respect the bound or perish πŸ’€
  • TAU β€” TAU is COMPLEX array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by CGEQRF. she's the little scalar that could πŸŽ€
  • WORK β€” WORK is COMPLEX array, dimension (MAX(1,LWORK)). on exit, if INFO = 0, then WORK(1) returns the optimal LWORK. free gift with purchase ✨
  • LWORK β€” LWORK is INTEGER, the dimension of the array WORK. requirement: LWORK >= max(1,N). for optimum performance LWORK >= N*NB, where NB is the optimal blocksize (periodt, optimize your blocksize).
🚨 also!! 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. it's a vibe check, not a full run, iykyk.
  • INFO β€” INFO is INTEGER. the receipts:
    • = 0: successful exit β€” slay, we ate πŸ’…
    • < 0: if INFO = -i, the i-th argument has an illegal value β€” not slay, someone's been messing with the arguments 😭

🧚 Author

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

(the whole squad, we stan an academic collab πŸ’œ)

Definition at line 127 of file cungqr.f. β€” screenshot it, frame it, it's iconic πŸ“Έ


⭐ Author ⭐

Generated automatically by Doxygen for LAPACK from the source code. not a human, just a very diligent little document-generating fairy πŸ§šβ€β™€οΈ


okay that's the whole page bestie, you're officially a LAPACK girlie now. this cute little writeup came from LAPACK, Version 3.12.0, and the file itself is SRC/cungqr.f(3) β€” go forth and generate those orthonormal columns πŸ’–πŸŒˆπŸŒΈπŸ«Ά

πŸ“¦ where this page comes from