CUPMTR(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’… 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 to CHPTRD; = 'L': Lower triangular packed storage used in previous call to CHPTRD. it's just telling us which storage your last CHPTRD call 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) if SIDE = 'L', (N*(N+1)/2) if SIDE = 'R'. The vectors which define the elementary reflectors, as returned by CHPTRD. 🚨 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 reflector H(i), as returned by CHPTRD. so like, TAU is 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 by Q*C or Q**H*C or C*Q**H or C*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) if SIDE = 'L', (M) if SIDE = '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: if INFO = -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