SRC/zunmhr.f(3)

πŸ’… SRC/zunmhr.f β€” bestie, let me tell you about zunmhr πŸŽ€

Okay so real talk: this is a man page for a Fortran file. The manual is the Library Functions Manual, the file is SRC/zunmhr.f, and honestly? It's giving "quietly carrying the entire linear algebra world on its back." Let's get into it. ✨


🌸 NAME 🌸

SRC/zunmhr.f β€” that's the whole name, no notes, she's confident. πŸ’…


✨ SYNOPSIS ✨

Functions/Subroutines

Here's the whole squad, sitting in one line like it's no big deal:

subroutine zunmhr (side, trans, m, n, ilo, ihi, a, lda, tau, c, ldc,
    work, lwork, info)
    ZUNMHR

That's ZUNMHR (pronounced "zee-you-en-em-aitch-are," or just "the girl who does the thing"). 🫢


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

πŸ¦‹ The full signature, in all her glory πŸ¦‹

subroutine zunmhr (character side, character trans, integer m, integer n,
    integer ilo, integer ihi, complex*16, dimension( lda, * ) a, integer
    lda, complex*16, dimension( * ) tau, complex*16, dimension( ldc, * ) c,
    integer ldc, complex*16, dimension( * ) work, integer lwork, integer
    info)

ZUNMHR β€” periodt. πŸ’œ

🎯 Purpose:

ZUNMHR overwrites the general complex M-by-N matrix C with
                SIDE = 'L'     SIDE = 'R'
TRANS = 'N':      Q * C          C * Q
TRANS = 'C':      Q**H * C       C * Q**H
where Q is a complex unitary matrix of order nq, with nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of IHI-ILO elementary reflectors, as returned by ZGEHRD:
Q = H(ilo) H(ilo+1) . . . H(ihi-1).

Like, she literally multiplies your matrix by Q (or Q**H) from whichever side you want. Main character energy, honestly. πŸ”₯


🌈 Parameters (the whole cast, no skips, bestie) 🌈

🌸 SIDE

SIDE is CHARACTER*1 = 'L': apply Q or Q**H from the Left; = 'R': apply Q or Q**H from the Right.

Pick a side, any side. Left or right, she's flexible. πŸ’…

πŸ¦‹ TRANS

TRANS is CHARACTER*1 = 'N': apply Q (No transpose) = 'C': apply Q**H (Conjugate transpose)

'N' for normal, 'C' for conjugate-transposed. Ngl, don't mix these up β€” conjugate transpose is not the same as plain transpose, iykyk. 😭

⭐ M

M is INTEGER The number of rows of the matrix C. M >= 0.

Rows. Count them. If it's negative, that's a vibe check failure. 🫢

πŸŽ€ N

N is INTEGER The number of columns of the matrix C. N >= 0.

Columns. Also can't be negative, fr fr.

πŸ’œ ILO

ILO is INTEGER

That's it. That's the whole description. She's mysterious. πŸ™ˆ

πŸ’– 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). If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and ILO = 1 and IHI = 0, if M = 0; if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and ILO = 1 and IHI = 0, if N = 0.
Ok so important: these HAVE to match what you passed to ZGEHRD last time. Same values, no cap. Outside that submatrix Q is just the identity, she's not doing extra work for no reason. πŸ’…

🧚 A

A is COMPLEX*16 array, dimension (LDA,M) if SIDE = 'L' (LDA,N) if SIDE = 'R' The vectors which define the elementary reflectors, as returned by ZGEHRD.

The reflector vectors themselves, straight from ZGEHRD's hands. 🫢

🌟 LDA

LDA is INTEGER The leading dimension of the array A. LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.

Leading dimension, and yes the bound flips depending on SIDE. Read it twice, bestie. πŸ‘€

πŸ“ TAU

TAU is COMPLEX*16 array, dimension (M-1) if SIDE = 'L' (N-1) if SIDE = 'R' TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by ZGEHRD.

Note the dimension is M-1 / N-1 β€” minus one, she's not padding. 😌

πŸ¦„ C

C is COMPLEX*16 array, dimension (LDC,N) On entry, the M-by-N matrix C. On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.

Heads up: she overwrites C. Your original matrix is gone, bestie, it ate and left no crumbs. πŸ’€

🌈 LDC

LDC is INTEGER The leading dimension of the array C. LDC >= max(1,M).

Leading dimension of C. Minimum is max(1,M), always M, doesn't flip. Slay. ✨

πŸ’ WORK

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

Scratch space, and she'll tell you the optimal LWORK on the way out. Free intel. πŸ”₯

πŸ‘‘ LWORK

LWORK is INTEGER The dimension of the array WORK. If SIDE = 'L', LWORK >= max(1,N); if SIDE = 'R', LWORK >= max(1,M). For optimum performance LWORK >= N*NB if SIDE = 'L', and LWORK >= M*NB if SIDE = 'R', 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.
🫢 Workspace-query hack, iykyk: set LWORK = -1, she computes the optimal size, drops it in WORK(1), and XERBLA stays quiet β€” literally no error message about LWORK. Just don't forget the real call afterwards, bestie. 😭

πŸŽ€ INFO

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

Zero means we're so back. Negative means argument number -INFO was giving illegal-value energy. πŸ™ˆ


🧚 Author 🧚

The whole academic dream team showed up:

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

Absolute icons, all four. πŸ‘‘


πŸ“– Definition πŸ“–

Definition at line 176 of file zunmhr.f. Marks the spot. ⭐


🌟 Author (again) 🌟

Generated automatically by Doxygen for LAPACK from the source code. She's a bot-made baddie, but the math is real. πŸ’…


Anyway bestie, that's the whole page β€” every parameter, every bound, every exit code, not a single thing skipped. Go multiply something. πŸ¦‹

Signed off with love from the LAPACK girlies, Version 3.12.0, dated by the original page footer β€” catch you in the next man page! πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from