CUPMTR(3)
π CUPMTR(3) π
ok so real talk, this is a page from the Library Functions Manual (the lapack static 3.12.0 build, if you're keeping receipts), and it's all about one lil' subroutine that's lowkey a workhorse. buckle up bestie, we're doing linear algebra π¦
β¨ NAME β¨
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/cupmtr.f
like yes, that's genuinely the whole name, it's giving "my legal name is my file path" π and honestly? iconic.
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine CUPMTR (side, uplo, trans, m, n, ap, tau, c, ldc, work, info)
CUPMTR
π Function/Subroutine Documentation π
subroutine CUPMTR (character side, character uplo, character trans, integer
m, integer n, complex, dimension( * ) ap, complex, dimension( * ) tau,
complex, dimension( ldc, * ) c, integer ldc, complex, dimension( * )
work, integer info)
CUPMTR
π Purpose π
okay so here's the vibe, no cap:
!>
!> CUPMTR 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
!> nq-1 elementary reflectors, as returned by CHPTRD using packed
!> storage:
!>
!> if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
!>
!> if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
!>
so basically it takes your matrix C and slaps Q or Q**H on it, on the left or the right, depending on the flags. and Q itself is built out of nq-1 elementary reflectors that CHPTRD already handed you in packed storage. the order of the multiply hinges on UPLO β upper triangular packed storage gives you Q = H(nq-1) . . . H(2) H(1), lower gives you Q = H(1) H(2) . . . H(nq-1). it's giving assembly instructions but make it math β¨
π Parameters π
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, bestie.UPLOβ π«UPLO is CHARACTER*1β= 'U': Upper triangular packed storage used in previous call toCHPTRD;= 'L': Lower triangular packed storage used in previous call toCHPTRD. it's just telling us which storage your lastCHPTRDcall used, so stay consistent π«ΆTRANSβ π«TRANS is CHARACTER*1β= 'N': No transpose, apply Q;= 'C': Conjugate transpose, apply Q**H. choose your fighter.Mβ π«M is INTEGERβ The number of rows of the matrix C.M >= 0. (yes, zero is allowed, we love a boundary case)Nβ π«N is INTEGERβ The number of columns of the matrix C.N >= 0. same energy.APβ π«AP is COMPLEX array, dimensionβ(M*(M+1)/2)ifSIDE = 'L',(N*(N+1)/2)ifSIDE = 'R'. The vectors which define the elementary reflectors, as returned byCHPTRD. π¨ important:AP is modified by the routine but restored on exit.so it's a little chaotic in the middle but it puts everything back, we stan a respectful queen πTAUβ π«TAU is COMPLEX array, dimension (M-1) if SIDE = 'L'or(N-1) if SIDE = 'R'βTAU(i)must contain the scalar factor of the elementary reflectorH(i), as returned byCHPTRD. so like,TAUis the seasoning for each reflector, don't skip it.Cβ π«C is COMPLEX array, dimension (LDC,N)β On entry, the M-by-N matrix C. On exit, C is overwritten byQ*CorQ**H*CorC*Q**HorC*Q. main character gets a full makeover β¨LDCβ π«LDC is INTEGERβ The leading dimension of the array C.LDC >= max(1,M). respect the floor, fr fr.WORKβ π«WORK is COMPLEX array, dimensionβ(N)ifSIDE = 'L',(M)ifSIDE = 'R'. the lil' scratch workspace. it's not here for the drama, it's here to help.INFOβ π«INFO is INTEGERβ= 0: successful exit π;< 0: ifINFO = -i, the i-th argument had an illegal value π. so if you get a negative number, go count your arguments, that's the whole tea.
π§ Author π§
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
β Definition at line 148 of file cupmtr.f. β
π Author π
Generated automatically by Doxygen for LAPACK from the source code. (not me writing a whole essay by hand, the robot did it π)
and that's the page bestie!! hope this slayed for you π ok so obligatory cute sign-off β this lil' beauty is from LAPACK, Version 3.12.0 π so if you see this kicking around in your LAPACK Version 3.12.0 docs, yes, that's the one. stay hydrated, stay unitary π¦β¨
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms