SGEQRT(3)

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

πŸŽ€ SGEQRT πŸŽ€

okay bestie, so this is a page straight outta LAPACK β€” like, the Library Functions Manual energy, the whole /home/abui...RC/sgeqrt.f(3) situation πŸ’… β€” and it's literally all about one lil Fortran subroutine that does blocked QR factorization. stay with me, it slaps.


✨ SYNOPSIS ✨

Functions/Subroutines

subroutine SGEQRT (m, n, nb, a, lda, t, ldt, work, info)

that's it, that's the whole vibe: SGEQRT. iconic name, does exactly what it says 🫢


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

subroutine SGEQRT (integer m, integer n, integer nb, real, dimension( lda, * ) a,
                   integer lda, real, dimension( ldt, * ) t, integer ldt,
                   real, dimension( * ) work, integer info)

SGEQRT ✨ (yes it appears twice in the original, she's got main character energy like that)

πŸ”₯ Purpose

!> !> SGEQRT computes a blocked QR factorization of a real M-by-N matrix A !> using the compact WY representation of Q. !>

so, like β€” blocked QR factorization, real M-by-N matrix A, compact WY representation of Q. that's the whole assignment and she ATE. πŸ’…


🌸 Parameters 🌸

  • M β€” M is INTEGER. the number of rows of the matrix A, and bestie: M >= 0. no negative rows allowed, we don't do that here 🚫
  • N β€” N is INTEGER. the number of columns of the matrix A. N >= 0. same rule, fr fr.
  • NB β€” NB is INTEGER. the block size used in the blocked QR, and the constraint is MIN(M,N) >= NB >= 1 β€” so she's gotta be at least 1 and no bigger than the smaller of M/N. respect the range πŸ™
  • A β€” A is REAL array, dimension (LDA,N).
    • on entry: the M-by-N matrix A.
    • on exit: the elements on and above the diagonal contain the min(M,N)-by-N upper trapezoidal matrix R (and R is upper triangular if M >= N, slay); the elements below the diagonal are the columns of V. glow-up on exit, honestly πŸ’–
  • LDA β€” LDA is INTEGER. the leading dimension of the array A. LDA >= max(1,M). non-negotiable.
  • T β€” T is REAL array, dimension (LDT,MIN(M,N)). the upper triangular block reflectors stored in compact form as a sequence of upper triangular blocks. see below for the deets πŸ‘‡
  • LDT β€” LDT is INTEGER. the leading dimension of the array T. LDT >= NB. periodt.
  • WORK β€” WORK is REAL array, dimension (NB*N). it's giving workspace. it works so the main character doesn't have to. 😭
  • INFO β€” INFO is INTEGER, and this is the vibe check:
    • = 0: successful exit πŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value πŸ’€ (go check that argument, bestie)

πŸ‘‘ Author

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

the whole friend group showed up for this one 🫢🌸


πŸ¦‹ Further Details

!> !> The matrix V stores the elementary reflectors H(i) in the i-th column !> below the diagonal. For example, if M=5 and N=3, the matrix V is !> !> V = ( 1 ) !> ( v1 1 ) !> ( v1 v2 1 ) !> ( v1 v2 v3 ) !> ( v1 v2 v3 ) !> !> where the vi's represent the vectors which define H(i), which are returned !> in the matrix A. The 1's along the diagonal of V are not stored in A. !>

so the matrix V keeps the elementary reflectors H(i) chilling in the i-th column below the diagonal. example time: if M=5 and N=3, V looks like this ⬇️

              V = (  1       )
                  ( v1  1    )
                  ( v1 v2  1 )
                  ( v1 v2 v3 )
                  ( v1 v2 v3 )

and the vi's are the vectors defining H(i), returned in the matrix A. important lil detail: the 1's along the diagonal of V are NOT stored in A. they're just implied. we love a low-maintenance diagonal πŸ’…

!> !> Let K=MIN(M,N). The number of blocks is B = ceiling(K/NB), where each !> block is of order NB except for the last block, which is of order !> IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block !> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB !> for the last block) T's are stored in the NB-by-K matrix T as !> !> T = (T1 T2 ... TB). !>

the math part, no cap: let K=MIN(M,N). the number of blocks is B = ceiling(K/NB), and every block is of order NB β€” except the last one, which is of order IB = K - (B-1)*NB (she's special, she's the finale πŸŽ€). for each of the B blocks you get an upper triangular block reflector factor computed: T1, T2, ..., TB. the NB-by-NB ones (and the IB-by-IB one for the last block) get stored in the NB-by-K matrix T like:

              T = (T1 T2 ... TB).

look at her, all lined up. obsessed. ✨


🧚 Definition location

definition at line 140 of file sgeqrt.f. iykyk. 😌

🌈 Author (the meta one)

generated automatically by Doxygen for LAPACK from the source code. yes she was born in a build pipeline and yes she's still gorgeous.


and that's the whole page bestie!! remember when i said the top was giving Library Functions Manual and sgeqrt.f(3)?? well down here at the bottom it's LAPACK, Version 3.12.0, dated /home/abui...RC/sgeqrt.f(3) β€” so yeah, that's the source/version/date trio signing off πŸ«ΆπŸ’œ mwah, go compute something cute. πŸ¦‹β­

πŸ“¦ where this page comes from