unghr(3)

πŸ’… unghr β€” the manual page, but make it make sense

okay bestie, gather round, because we're about to talk about unghr(3) β€” that's the family name for {un,or}ghr, and no I'm not kidding, that's literally how the page writes it. lower-case un, comma, or, then ghr. it's giving "the naming committee was running late" but we respect it πŸ’–

the whole personality of this little guy is: generate Q from gehrd. that's the entire NAME section. that's the mission. gehrd did a thing, and now somebody has to build Q, and that somebody is this function. no cap. 🫢


✨ NAME ✨

unghr β€” {un,or}ghr: generate Q from gehrd

like literally that's it, that's the name line. it doesn't want to elaborate. it's mysterious. main character energy fr πŸ”₯


πŸ¦‹ SYNOPSIS πŸ¦‹

Functions

bestie there are four of them and they all take the exact same arguments, which is lowkey iconic of them ngl. one per precision, one per vibe. here we go:

  • subroutine cunghr (n, ilo, ihi, a, lda, tau, work, lwork, info) β€” CUNGHR. complex, single precision, and yes the c is doing a lot of work in that name πŸ‘‘
  • subroutine dorghr (n, ilo, ihi, a, lda, tau, work, lwork, info) β€” DORGHR. double precision, but real β€” the d stands for "doing the most, in double" πŸ’œ
  • subroutine sorghr (n, ilo, ihi, a, lda, tau, work, lwork, info) β€” SORGHR. single precision, real, the budget-friendly icon of the group πŸŽ€
  • subroutine zunghr (n, ilo, ihi, a, lda, tau, work, lwork, info) β€” ZUNGHR. complex and double precision, aka the deluxe edition, aka the one that eats πŸ’…

so if you're squinting at that list: yes, the full argument list is identical across all four. same order, same names, every single time:

(n, ilo, ihi, a, lda, tau, work, lwork, info)

and the all-caps name next to each one β€” CUNGHR, DORGHR, SORGHR, ZUNGHR β€” is exactly how it's written in the page, so keep them uppercase when you're yelling about them in the group chat. ⭐

ngl the synopsis is doing that thing where it tells you the shape of the thing but not the lore. the lore is coming, bestie, don't worry.

🌸 Detailed Description 🌸

okay so here's the thing β€” the page goes straight from the header into a Detailed Description section, and up to this point in the page… that's it. it's the section heading and nothing else so far. no paragraphs, no dorgqr-style life story, not a single prose line. the description is literally just chillin' there, waiting for the rest of its content to show up 😭

and look β€” I'm not gonna sit here and invent lore for you, because that would be making stuff up and that's not the vibe. everything past this point is in the next chunk of the page. so consider this a vibe check passed and a "to be continued…" delivery πŸ¦‹βœ¨

part 1: done. part 2: incoming. don't go anywhere 🫢

πŸ’… FUNCTION DOCUMENTATION

πŸ¦‹ cunghr β€” complex unitary, but make it fashion

subroutine cunghr (integer n, integer ilo, integer ihi, complex, dimension( lda, * ) a, integer lda, complex, dimension( * ) tau, complex, dimension( * ) work, integer lwork, integer info)

CUNGHR is the complex unitary glow-up bestie β€” it builds Q for you and it is not here to be subtle.

🎯 Purpose

CUNGHR generates a complex unitary matrix Q which is defined as the product of IHI-ILO elementary reflectors of order N, as returned by CGEHRD:

Q = H(ilo) H(ilo+1) . . . H(ihi-1).

🌸 Parameters

  • N β€” N is INTEGER. The order of the matrix Q. N >= 0.
  • ILO β€” ILO is INTEGER. That’s the whole note, bestie β€” no extra lore.
  • IHI β€” IHI is INTEGER. ILO and IHI must have the same values as in the previous call of CGEHRD. Q is equal to the unit matrix except in the submatrix Q(ilo+1:ihi,ilo+1:ihi). 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
  • A β€” A is COMPLEX array, dimension (LDA,N). On entry, the vectors which define the elementary reflectors, as returned by CGEHRD. On exit, the N-by-N unitary matrix Q.
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,N).
  • TAU β€” TAU is COMPLEX array, dimension (N-1). TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by CGEHRD.
  • WORK β€” WORK is COMPLEX array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
  • LWORK β€” LWORK is INTEGER. The dimension of the array WORK. LWORK >= IHI-ILO. For optimum performance LWORK >= (IHI-ILO)*NB, where NB is the optimal blocksize. 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: 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.

Definition at line 125 of file cunghr.f.


🐚 dorghr β€” double-precision orthogonal realness

subroutine dorghr (integer n, integer ilo, integer ihi, double precision, dimension( lda, * ) a, integer lda, double precision, dimension( * ) tau, double precision, dimension( * ) work, integer lwork, integer info)

DORGHR is giving real orthogonal main character energy, and yes, it is built from the reflectors that DGEHRD handed you.

🎯 Purpose

DORGHR generates a real orthogonal matrix Q which is defined as the product of IHI-ILO elementary reflectors of order N, as returned by DGEHRD:

Q = H(ilo) H(ilo+1) . . . H(ihi-1).

🌸 Parameters

  • N β€” N is INTEGER. The order of the matrix Q. N >= 0.
  • ILO β€” ILO is INTEGER. Short and sweet, no extra details.
  • IHI β€” IHI is INTEGER. ILO and IHI must have the same values as in the previous call of DGEHRD. Q is equal to the unit matrix except in the submatrix Q(ilo+1:ihi,ilo+1:ihi). 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
  • A β€” A is DOUBLE PRECISION array, dimension (LDA,N). On entry, the vectors which define the elementary reflectors, as returned by DGEHRD. On exit, the N-by-N orthogonal matrix Q.
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,N).
  • TAU β€” TAU is DOUBLE PRECISION array, dimension (N-1). TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by DGEHRD.
  • WORK β€” WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
  • LWORK β€” LWORK is INTEGER. The dimension of the array WORK. LWORK >= IHI-ILO. For optimum performance LWORK >= (IHI-ILO)*NB, where NB is the optimal blocksize. 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: 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.

Definition at line 125 of file dorghr.f.


🌈 sorghr β€” single-precision real orthogonal, slaying

subroutine sorghr (integer n, integer ilo, integer ihi, real, dimension( lda, * ) a, integer lda, real, dimension( * ) tau, real, dimension( * ) work, integer lwork, integer info)

SORGHR is the real orthogonal bestie for your SGEHRD era. Same energy, single precision, zero chill.

🎯 Purpose

SORGHR generates a real orthogonal matrix Q which is defined as the product of IHI-ILO elementary reflectors of order N, as returned by SGEHRD:

Q = H(ilo) H(ilo+1) . . . H(ihi-1).

🌸 Parameters

  • N β€” N is INTEGER. The order of the matrix Q. N >= 0.
  • ILO β€” ILO is INTEGER. That’s it β€” iconic brevity.
  • IHI β€” IHI is INTEGER. ILO and IHI must have the same values as in the previous call of SGEHRD. Q is equal to the unit matrix except in the submatrix Q(ilo+1:ihi,ilo+1:ihi). 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
  • A β€” A is REAL array, dimension (LDA,N). On entry, the vectors which define the elementary reflectors, as returned by SGEHRD. On exit, the N-by-N orthogonal matrix Q.
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,N).
  • TAU β€” TAU is REAL array, dimension (N-1). TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by SGEHRD.
  • WORK β€” WORK is REAL array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
  • LWORK β€” LWORK is INTEGER. The dimension of the array WORK. LWORK >= IHI-ILO. For optimum performance LWORK >= (IHI-ILO)*NB, where NB is the optimal blocksize. 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: 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.

Definition at line 125 of file sorghr.f.


πŸ¦„ zunghr β€” complex*16 unitary, absolutely ate

subroutine zunghr (integer n, integer ilo, integer ihi, complex*16, dimension( lda, * ) a, integer lda, complex*16, dimension( * ) tau, complex*16, dimension( * ) work, integer lwork, integer info)

ZUNGHR is the complex*16 unitary queen of the group β€” ZGEHRD gave you the reflectors, and this routine turns them into the full Q.

🎯 Purpose

ZUNGHR generates a complex unitary matrix Q which is defined as the product of IHI-ILO elementary reflectors of order N, as returned by ZGEHRD:

Q = H(ilo) H(ilo+1) . . . H(ihi-1).

🌸 Parameters

  • N β€” N is INTEGER. The order of the matrix Q. N >= 0.
  • ILO β€” ILO is INTEGER. No extra commentary, just vibes.
  • IHI β€” IHI is INTEGER. ILO and IHI must have the same values as in the previous call of ZGEHRD. Q is equal to the unit matrix except in the submatrix Q(ilo+1:ihi,ilo+1:ihi). 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
  • A β€” A is COMPLEX*16 array, dimension (LDA,N). On entry, the vectors which define the elementary reflectors, as returned by ZGEHRD. On exit, the N-by-N unitary matrix Q.
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,N).
  • TAU β€” TAU is COMPLEX*16 array, dimension (N-1). TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by ZGEHRD.
  • WORK β€” WORK is COMPLEX*16 array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
  • LWORK β€” LWORK is INTEGER. The dimension of the array WORK. LWORK >= IHI-ILO. For optimum performance LWORK >= (IHI-ILO)*NB, where NB is the optimal blocksize. 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: 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.

Definition at line 125 of file zunghr.f.

πŸ’– AUTHOR πŸ’–

Okay so nobody actually wrote this page by hand, bestie β€” it's generated automatically by Doxygen for LAPACK from the source code. That's the whole origin story. The docs literally build themselves from the code, which is honestly iconic of them. πŸŽ€

So yeah β€” no mysterious midnight manpage poet to thank here, just Doxygen doing its little automated slay, pulling straight from the LAPACK source so the docs and the code stay in sync. No cap, that's the vibe. ✨


And that's a wrap on unghr(3), bestie β€” you made it to the end! 🫢 Go forth and generate those Q matrices with confidence. πŸ’…

This beauty comes to you courtesy of LAPACK, Version 3.12.0 β€” the unghr(3) page, straight from the source, no cap. πŸ¦‹ Bye bestie, ily, go slay some linear algebra! πŸ’œ

πŸ“¦ where this page comes from