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
SIDEisCHARACTER*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
TRANSisCHARACTER*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
MisINTEGERThe number of rows of the matrix C.M >= 0.
Rows. Count them. If it's negative, that's a vibe check failure. π«Ά
π N
NisINTEGERThe number of columns of the matrix C.N >= 0.
Columns. Also can't be negative, fr fr.
π ILO
ILOisINTEGER
That's it. That's the whole description. She's mysterious. π
π IHI
IHIisINTEGERILO and IHI must have the same values as in the previous call ofZGEHRD. Q is equal to the unit matrix except in the submatrixQ(ilo+1:ihi,ilo+1:ihi). IfSIDE = 'L', then1 <= ILO <= IHI <= M, ifM > 0, andILO = 1andIHI = 0, ifM = 0; ifSIDE = 'R', then1 <= ILO <= IHI <= N, ifN > 0, andILO = 1andIHI = 0, ifN = 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
AisCOMPLEX*16array, dimension(LDA,M) if SIDE = 'L' (LDA,N) if SIDE = 'R'The vectors which define the elementary reflectors, as returned byZGEHRD.
The reflector vectors themselves, straight from ZGEHRD's hands. π«Ά
π LDA
LDAisINTEGERThe leading dimension of the array A.LDA >= max(1,M)ifSIDE = 'L';LDA >= max(1,N)ifSIDE = 'R'.
Leading dimension, and yes the bound flips depending on SIDE. Read it twice, bestie. π
π TAU
TAUisCOMPLEX*16array, dimension(M-1) if SIDE = 'L' (N-1) if SIDE = 'R'TAU(i)must contain the scalar factor of the elementary reflectorH(i), as returned byZGEHRD.
Note the dimension is M-1 / N-1 β minus one, she's not padding. π
π¦ C
CisCOMPLEX*16array, dimension(LDC,N)On entry, the M-by-N matrix C. On exit, C is overwritten byQ*CorQ**H*CorC*Q**HorC*Q.
Heads up: she overwrites C. Your original matrix is gone, bestie, it ate and left no crumbs. π
π LDC
LDCisINTEGERThe 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
WORKisCOMPLEX*16array, dimension(MAX(1,LWORK))On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.
Scratch space, and she'll tell you the optimal LWORK on the way out. Free intel. π₯
π LWORK
LWORKisINTEGERThe dimension of the array WORK. IfSIDE = 'L',LWORK >= max(1,N); ifSIDE = 'R',LWORK >= max(1,M). For optimum performanceLWORK >= N*NBifSIDE = 'L', andLWORK >= M*NBifSIDE = 'R', where NB is the optimal blocksize. IfLWORK = -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 byXERBLA.
π«Ά Workspace-query hack, iykyk: setLWORK = -1, she computes the optimal size, drops it inWORK(1), andXERBLAstays quiet β literally no error message about LWORK. Just don't forget the real call afterwards, bestie. π
π INFO
INFOisINTEGER=0: successful exit <0: ifINFO = -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
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms