SRC/zungtr.f(3)

πŸ’… SRC/zungtr.f β€” like, the ZUNGTR page, but make it make sense

okay bestie, welcome to the zungtr glow-up ✨ this is a page out of the LAPACK library manual (yes, that LAPACK β€” the linear algebra one, the icon πŸ‘‘), and it's filed under SRC/zungtr.f(3), meaning section 3 of the manual, straight from the Fortran source file zungtr.f. Buckle up πŸŽ€


✨ NAME ✨

SRC/zungtr.f β€” the source file behind all this. That's it, that's the name. Short, sweet, main character energy πŸ’…


🌸 SYNOPSIS 🌸

πŸ¦‹ Functions/Subroutines

  • subroutine zungtr (uplo, n, a, lda, tau, work, lwork, info) β€” the one and only ZUNGTR, no cap

πŸ’– Function/Subroutine Documentation πŸ’–

🫢 subroutine zungtr

subroutine zungtr (character uplo, integer n, complex*16, dimension( lda, * ) a, integer lda, complex*16, dimension( * ) tau, complex*16, dimension( * ) work, integer lwork, integer info)

ZUNGTR β€” the name, again, because it deserves a second mention πŸ’« (this is the full declaration with every type and dimension, literally character for character, don't @ me)


🌈 Purpose

!> !> ZUNGTR generates a complex unitary matrix Q which is defined as the !> product of n-1 elementary reflectors of order N, as returned by !> ZHETRD: !> !> if UPLO = 'U', Q = H(n-1) . . . H(2) H(1), !> !> if UPLO = 'L', Q = H(1) H(2) . . . H(n-1). !>

so basically ✨ ZUNGTR builds you a complex unitary matrix Q, and Q is defined as the product of n-1 elementary reflectors of order N, exactly the ones ZHETRD handed back. Which order you multiply them in? that's the UPLO vibe check:

  • if UPLO = 'U', then Q = H(n-1) . . . H(2) H(1) β€” reverse order, she's quirky like that πŸ™ˆ
  • if UPLO = 'L', then Q = H(1) H(2) . . . H(n-1) β€” chronological, lowkey satisfying πŸ“

🧚 Parameters

πŸ’œ UPLO

!> UPLO is CHARACTER*1 !> = 'U': Upper triangle of A contains elementary reflectors !> from ZHETRD; !> = 'L': Lower triangle of A contains elementary reflectors !> from ZHETRD. !>

UPLO is a CHARACTER*1 β€” one single character, tiny but powerful πŸŽ€

  • = 'U': the upper triangle of A is where the elementary reflectors from ZHETRD are chilling
  • = 'L': the lower triangle of A is where they're at instead

πŸ’œ N

!> N is INTEGER !> The order of the matrix Q. N >= 0. !>

N is an INTEGER, and it's the order of the matrix Q. Constraint, fr: N >= 0. Not negotiable bestie 🫢

πŸ’œ A

!> A is COMPLEX*16 array, dimension (LDA,N) !> On entry, the vectors which define the elementary reflectors, !> as returned by ZHETRD. !> On exit, the N-by-N unitary matrix Q. !>

A is a COMPLEX*16 array, dimension (LDA,N) β€” the full glow-up timeline:

  • on entry: the vectors that define the elementary reflectors, just like ZHETRD returned them
  • on exit: boom, it's the N-by-N unitary matrix Q πŸ‘‘ she ate and left no crumbs

πŸ’œ LDA

!> LDA is INTEGER !> The leading dimension of the array A. LDA >= N. !>

LDA is an INTEGER β€” the leading dimension of the array A. Rule: LDA >= N. Respect the leading dimension or the routine will simply not deal with you πŸ’€

πŸ’œ 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 ZHETRD. !>

TAU is a COMPLEX*16 array, dimension (N-1) β€” and TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by ZHETRD. Must. Not "should". Must. πŸ’…

πŸ’œ WORK

!> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK)) !> On exit, if INFO = 0, WORK(1) returns the optimal LWORK. !>

WORK is a COMPLEX*16 array, dimension (MAX(1,LWORK)) β€” the workspace, the backstage area 🎭 on exit, if INFO = 0, then WORK(1) returns the optimal LWORK. Free info, love that for us ✨

πŸ’œ LWORK

!> LWORK is INTEGER !> The dimension of the array WORK. LWORK >= N-1. !> For optimum performance LWORK >= (N-1)*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. !>

LWORK is an INTEGER, the dimension of the array WORK. Bare minimum: LWORK >= N-1.

For optimum performance: LWORK >= (N-1)*NB, where NB is the optimal blocksize πŸ”₯ (go big or go home, ngl)

⭐ special case alert ⭐ if LWORK = -1, then a workspace query is assumed. The routine only calculates the optimal size of the WORK array, returns that 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 computation πŸ¦‹

πŸ’œ INFO

!> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !>

INFO is an INTEGER β€” the final report card πŸ“‹

  • = 0: successful exit, we love a happy ending πŸ’–
  • < 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.

the whole squad came together for this one, iconic collaboration 🀝


πŸŽ€ Definition at line 122 of file zungtr.f.

yes, line 122, in zungtr.f β€” now you know exactly where to point πŸ‘‘


⭐ Author ⭐

Generated automatically by Doxygen for LAPACK from the source code.

aka the docs wrote themselves, which is honestly the dream 😭✨


mwah πŸ’‹ that's the page β€” LAPACK, Version 3.12.0, and this little SRC/zungtr.f(3) beauty dropped with it. go forth and build your unitary matrices, bestie πŸ¦‹πŸ’œπŸŒˆ

πŸ“¦ where this page comes from