lasda(3)

✨ NAME ✨

lasda β€” lasda: D&C step: top level solver πŸ’… (yes that's the manual name lasda, from section 3, and honestly the name is doing the least, the actual work is in the two subroutines below πŸ”₯)


πŸ¦‹ SYNOPSIS πŸ¦‹

Functions

πŸ’– dlasda

subroutine dlasda (icompq, smlsiz, n, sqre, d, e, u, ldu, vt, k, difl,
    difr, z, poles, givptr, givcol, ldgcol, perm, givnum, c, s, work,
    iwork, info)

DLASDA computes the singular value decomposition (SVD) of a real upper bidiagonal matrix with diagonal d and off-diagonal e. Used by sbdsdc.

🌸 slasda

subroutine slasda (icompq, smlsiz, n, sqre, d, e, u, ldu, vt, k, difl,
    difr, z, poles, givptr, givcol, ldgcol, perm, givnum, c, s, work,
    iwork, info)

SLASDA computes the singular value decomposition (SVD) of a real upper bidiagonal matrix with diagonal d and off-diagonal e. Used by sbdsdc.

they're twins bestie β€” dlasda is the double precision one, slasda is the real one. Same argument list, same job, different precision. iykyk πŸ’«

πŸ‘‘ Detailed Description πŸ‘‘

okay so this page is basically two entire subroutine write-ups stacked on top of each other, and then every single parameter gets its own little paragraph. It's giving thorough. It's giving "my advisor made me document everything." We respect it 🫢

🌈 Function Documentation 🌈

πŸ’œ subroutine dlasda

subroutine dlasda (integer icompq, integer smlsiz, integer n, integer sqre,
    double precision, dimension( * ) d, double precision, dimension( * ) e,
    double precision, dimension( ldu, * ) u, integer ldu, double precision,
    dimension( ldu, * ) vt, integer, dimension( * ) k, double precision,
    dimension( ldu, * ) difl, double precision, dimension( ldu, * ) difr,
    double precision, dimension( ldu, * ) z, double precision, dimension(
    ldu, * ) poles, integer, dimension( * ) givptr, integer, dimension(
    ldgcol, * ) givcol, integer ldgcol, integer, dimension( ldgcol, * )
    perm, double precision, dimension( ldu, * ) givnum, double precision,
    dimension( * ) c, double precision, dimension( * ) s, double precision,
    dimension( * ) work, integer, dimension( * ) iwork, integer info)

DLASDA computes the singular value decomposition (SVD) of a real upper bidiagonal matrix with diagonal d and off-diagonal e. Used by sbdsdc.

⭐ Purpose ⭐

so here's the whole vibe: using a divide and conquer approach, DLASDA computes the singular value decomposition (SVD) of a real upper bidiagonal N-by-M matrix B with diagonal D and offdiagonal E, where M = N + SQRE. The algorithm computes the singular values in the SVD B = U * S * VT. The orthogonal matrices U and VT are optionally computed in compact form. πŸ‘‘

A related subroutine, DLASD0, computes the singular values and the singular vectors in explicit form.

little sibling energy: DLASD0 does the same thing but spills everything out explicitly instead of packing it compact. choose your fighter πŸ’…

πŸŽ€ Parameters πŸŽ€

  • ICOMPQ β€” INTEGER. Specifies whether singular vectors are to be computed in compact form, as follows: = 0: Compute singular values only. = 1: Compute singular vectors of upper bidiagonal matrix in compact form. 🌸
  • SMLSIZ β€” INTEGER. The maximum size of the subproblems at the bottom of the computation tree. (small = smlsiz, get it πŸ“)
  • N β€” INTEGER. The row dimension of the upper bidiagonal matrix. This is also the dimension of the main diagonal array D.
  • SQRE β€” INTEGER. Specifies the column dimension of the bidiagonal matrix. = 0: The bidiagonal matrix has column dimension M = N; = 1: The bidiagonal matrix has column dimension M = N + 1.
  • D β€” DOUBLE PRECISION array, dimension ( N ). On entry D contains the main diagonal of the bidiagonal matrix. On exit D, if INFO = 0, contains its singular values.
  • E β€” DOUBLE PRECISION array, dimension ( M-1 ). Contains the subdiagonal entries of the bidiagonal matrix. On exit, E has been destroyed. πŸ’€ gone. reduced to atoms.
  • U β€” DOUBLE PRECISION array, dimension ( LDU, SMLSIZ ) if ICOMPQ = 1, and not referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, U contains the left singular vector matrices of all subproblems at the bottom level.
  • LDU β€” INTEGER, LDU = > N. The leading dimension of arrays U, VT, DIFL, DIFR, POLES, GIVNUM, and Z. (that's a whole squad 😭)
  • VT β€” DOUBLE PRECISION array, dimension ( LDU, SMLSIZ+1 ) if ICOMPQ = 1, and not referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, VT**T contains the right singular vector matrices of all subproblems at the bottom level.
  • K β€” INTEGER array, dimension ( N ) if ICOMPQ = 1 and dimension 1 if ICOMPQ = 0. If ICOMPQ = 1, on exit, K(I) is the dimension of the I-th secular equation on the computation tree. 🌳
  • DIFL β€” DOUBLE PRECISION array, dimension ( LDU, NLVL ), where NLVL = floor(log_2 (N/SMLSIZ))). (yes, that's how it's written, three closing parens and all, I don't make the rules πŸ’…)
  • DIFR β€” DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1 and dimension ( N ) if ICOMPQ = 0. If ICOMPQ = 1, on exit, DIFL(1:N, I) and DIFR(1:N, 2 * I - 1) record distances between singular values on the I-th level and singular values on the (I -1)-th level, and DIFR(1:N, 2 * I ) contains the normalizing factors for the right singular vector matrix. See DLASD8 for details. πŸ¦‹
  • Z β€” DOUBLE PRECISION array, dimension ( LDU, NLVL ) if ICOMPQ = 1 and dimension ( N ) if ICOMPQ = 0. The first K elements of Z(1, I) contain the components of the deflation-adjusted updating row vector for subproblems on the I-th level.
  • POLES β€” DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1, and not referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, POLES(1, 2*I - 1) and POLES(1, 2*I) contain the new and old singular values involved in the secular equations on the I-th level.
  • GIVPTR β€” INTEGER array, dimension ( N ) if ICOMPQ = 1, and not referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, GIVPTR( I ) records the number of Givens rotations performed on the I-th problem on the computation tree. πŸ”„
  • GIVCOL β€” INTEGER array, dimension ( LDGCOL, 2 * NLVL ) if ICOMPQ = 1, and not referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, for each I, GIVCOL(1, 2 *I - 1) and GIVCOL(1, 2 *I) record the locations of Givens rotations performed on the I-th level on the computation tree.
  • LDGCOL β€” INTEGER, LDGCOL = > N. The leading dimension of arrays GIVCOL and PERM.
  • PERM β€” INTEGER array, dimension ( LDGCOL, NLVL ) if ICOMPQ = 1, and not referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, PERM(1, I) records permutations done on the I-th level of the computation tree.
  • GIVNUM β€” DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1, and not referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, for each I, GIVNUM(1, 2 *I - 1) and GIVNUM(1, 2 *I) record the C- and S-values of Givens rotations performed on the I-th level on the computation tree.
  • C β€” DOUBLE PRECISION array, dimension ( N ) if ICOMPQ = 1, and dimension 1 if ICOMPQ = 0. If ICOMPQ = 1 and the I-th subproblem is not square, on exit, C( I ) contains the C-value of a Givens rotation related to the right null space of the I-th subproblem.
  • S β€” DOUBLE PRECISION array, dimension ( N ) if ICOMPQ = 1, and dimension 1 if ICOMPQ = 0. If ICOMPQ = 1 and the I-th subproblem is not square, on exit, S( I ) contains the S-value of a Givens rotation related to the right null space of the I-th subproblem. (C and S are a matching set, we love a coordinated moment πŸŽ€)
  • WORK β€” DOUBLE PRECISION array, dimension (6 * N + (SMLSIZ + 1)*(SMLSIZ + 1)). 🫢
  • IWORK β€” INTEGER array, dimension (7*N).
  • INFO β€” INTEGER. = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value. > 0: if INFO = 1, a singular value did not converge. 😭

🌟 Author 🌟

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

🧚 Contributors: 🧚

Ming Gu and Huan Ren, Computer Science Division, University of California at Berkeley, USA πŸ’–

Definition at line 270 of file dlasda.f.


🫢 subroutine slasda

subroutine slasda (integer icompq, integer smlsiz, integer n, integer sqre,
    real, dimension( * ) d, real, dimension( * ) e, real, dimension( ldu, *
    ) u, integer ldu, real, dimension( ldu, * ) vt, integer, dimension( * )
    k, real, dimension( ldu, * ) difl, real, dimension( ldu, * ) difr, real,
    dimension( ldu, * ) z, real, dimension( ldu, * ) poles, integer,
    dimension( * ) givptr, integer, dimension( ldgcol, * ) givcol, integer
    ldgcol, integer, dimension( ldgcol, * ) perm, real, dimension( ldu, * )
    givnum, real, dimension( * ) c, real, dimension( * ) s, real, dimension(
    * ) work, integer, dimension( * ) iwork, integer info)

SLASDA computes the singular value decomposition (SVD) of a real upper bidiagonal matrix with diagonal d and off-diagonal e. Used by sbdsdc.

πŸ”₯ Purpose πŸ”₯

Same storyline, single precision edition: using a divide and conquer approach, SLASDA computes the singular value decomposition (SVD) of a real upper bidiagonal N-by-M matrix B with diagonal D and offdiagonal E, where M = N + SQRE. The algorithm computes the singular values in the SVD B = U * S * VT. The orthogonal matrices U and VT are optionally computed in compact form.

A related subroutine, SLASD0, computes the singular values and the singular vectors in explicit form. (see, DLASD0 but with an S, the naming convention is literally just the first letter, no cap 🧒)

πŸ’œ Parameters πŸ’œ

  • ICOMPQ β€” INTEGER. Specifies whether singular vectors are to be computed in compact form, as follows: = 0: Compute singular values only. = 1: Compute singular vectors of upper bidiagonal matrix in compact form.

and that's where the page cuts off in part one β€” the rest of the SLASDA parameter parade is coming in the next part, so don't go anywhere bestie πŸŒˆπŸ’«
  • ICOMPQ β€” ICOMPQ is INTEGER, and it decides whether singular vectors get computed in compact form, bestie. = 0: Compute singular values only. = 1: Compute singular vectors of upper bidiagonal matrix in compact form. ✨
  • SMLSIZ β€” SMLSIZ is INTEGER. It’s the maximum size of the subproblems at the bottom of the computation tree. 🫢
  • N β€” N is INTEGER. This is the row dimension of the upper bidiagonal matrix. It’s also the dimension of the main diagonal array D. πŸ’…
  • SQRE β€” SQRE is INTEGER. It specifies the column dimension of the bidiagonal matrix. = 0: The bidiagonal matrix has column dimension M = N; = 1: The bidiagonal matrix has column dimension M = N + 1. 🌸
  • D β€” D is REAL array, dimension ( N ). On entry D contains the main diagonal of the bidiagonal matrix. On exit D, if INFO = 0, contains its singular values. ⭐
  • E β€” E is REAL array, dimension ( M-1 ). It contains the subdiagonal entries of the bidiagonal matrix. On exit, E has been destroyed. πŸ’€
  • U β€” U is REAL array, dimension ( LDU, SMLSIZ ) if ICOMPQ = 1, and not referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, U contains the left singular vector matrices of all subproblems at the bottom level. πŸ‘‘
  • LDU β€” LDU is INTEGER, LDU = > N. It’s the leading dimension of arrays U, VT, DIFL, DIFR, POLES, GIVNUM, and Z. πŸŽ€
  • VT β€” VT is REAL array, dimension ( LDU, SMLSIZ+1 ) if ICOMPQ = 1, and not referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, VT**T contains the right singular vector matrices of all subproblems at the bottom level. πŸ¦‹
  • K β€” K is INTEGER array, dimension ( N ) if ICOMPQ = 1 and dimension 1 if ICOMPQ = 0. If ICOMPQ = 1, on exit, K(I) is the dimension of the I-th secular equation on the computation tree. πŸ”₯
  • DIFL β€” DIFL is REAL array, dimension ( LDU, NLVL ), where NLVL = floor(log_2 (N/SMLSIZ))). 🌈
  • DIFR β€” DIFR is REAL array, dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1 and dimension ( N ) if ICOMPQ = 0. If ICOMPQ = 1, on exit, DIFL(1:N, I) and DIFR(1:N, 2 * I - 1) record distances between singular values on the I-th level and singular values on the (I -1)-th level, and DIFR(1:N, 2 * I ) contains the normalizing factors for the right singular vector matrix. See SLASD8 for details. 🧚
  • Z β€” Z is REAL array, dimension ( LDU, NLVL ) if ICOMPQ = 1 and dimension ( N ) if ICOMPQ = 0. The first K elements of Z(1, I) contain the components of the deflation-adjusted updating row vector for subproblems on the I-th level. πŸ’–
  • POLES β€” POLES is REAL array, dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1, and not referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, POLES(1, 2*I - 1) and POLES(1, 2*I) contain the new and old singular values involved in the secular equations on the I-th level. 🌟
  • GIVPTR β€” GIVPTR is INTEGER array, dimension ( N ) if ICOMPQ = 1, and not referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, GIVPTR( I ) records the number of Givens rotations performed on the I-th problem on the computation tree. πŸŒ€
  • GIVCOL β€” GIVCOL is INTEGER array, dimension ( LDGCOL, 2 * NLVL ) if ICOMPQ = 1, and not referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, for each I, GIVCOL(1, 2 *I - 1) and GIVCOL(1, 2 *I) record the locations of Givens rotations performed on the I-th level on the computation tree. 🎯
  • LDGCOL β€” LDGCOL is INTEGER, LDGCOL = > N. It’s the leading dimension of arrays GIVCOL and PERM. 🫧
  • PERM β€” PERM is INTEGER array, dimension ( LDGCOL, NLVL ) if ICOMPQ = 1, and not referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, PERM(1, I) records permutations done on the I-th level of the computation tree. 🌸
  • GIVNUM β€” GIVNUM is REAL array, dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1, and not referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, for each I, GIVNUM(1, 2 *I - 1) and GIVNUM(1, 2 *I) record the C- and S-values of Givens rotations performed on the I-th level on the computation tree. πŸ’«
  • C β€” C is REAL array, dimension ( N ) if ICOMPQ = 1, and dimension 1 if ICOMPQ = 0. If ICOMPQ = 1 and the I-th subproblem is not square, on exit, C( I ) contains the C-value of a Givens rotation related to the right null space of the I-th subproblem. πŸ“
  • S β€” S is REAL array, dimension ( N ) if ICOMPQ = 1, and dimension 1 if ICOMPQ = 0. If ICOMPQ = 1 and the I-th subproblem is not square, on exit, S( I ) contains the S-value of a Givens rotation related to the right null space of the I-th subproblem. πŸ“
  • WORK β€” WORK is REAL array, dimension (6 * N + (SMLSIZ + 1)*(SMLSIZ + 1)). πŸ› οΈ
  • IWORK β€” IWORK is INTEGER array, dimension (7*N). πŸ› οΈ
  • INFO β€” INFO is INTEGER. = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value. > 0: if INFO = 1, a singular value did not converge. 😭
bestie, INFO = 1 is the β€œa singular value did not converge” moment β€” not the vibe, but at least it’s clearly labeled πŸ’€

πŸ‘‘ Author

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

πŸ’– Contributors:

Ming Gu and Huan Ren, Computer Science Division, University of California at Berkeley, USA

Definition at line 270 of file slasda.f.

πŸ‘‘ Author

This page was generated automatically by Doxygen for LAPACK from the source code β€” yes, even the docs have main-character energy πŸ’…


Aaaand scene 🎬 β€” footer sign-off: LAPACK, Version 3.12.0, lasda(3). Stay slay, bestie πŸ’–βœ¨

πŸ“¦ where this page comes from