lalsa(3)

๐ŸŒธ lalsa โ€” SVD of the coefficient matrix, a step inside gelsd ๐ŸŒธ

okay so first of all, this is the lalsa(3) page out of the Library Functions Manual, and bestie it is not one function, it is four functions wearing one trench coat ๐Ÿ’…. One per numeric flavor. Same energy, different precision. We got:

  • clalsa โ€” the complex one
  • dlalsa โ€” the double precision one
  • slalsa โ€” the real one
  • zlalsa โ€” the complex*16 one

and every single one of them does the same iconic thing: computes the SVD of the coefficient matrix in compact form, and it's used by sgelsd. periodt.


โœจ SYNOPSIS โœจ

๐ŸŽ€ Functions

  • clalsa โ€” CLALSA computes the SVD of the coefficient matrix in compact form. Used by sgelsd.
subroutine clalsa (icompq, smlsiz, n, nrhs, b, ldb, bx, ldbx, u, ldu,
    vt, k, difl, difr, z, poles, givptr, givcol, ldgcol, perm, givnum,
    c, s, rwork, iwork, info)
  • dlalsa โ€” DLALSA computes the SVD of the coefficient matrix in compact form. Used by sgelsd.
subroutine dlalsa (icompq, smlsiz, n, nrhs, b, ldb, bx, ldbx, u, ldu,
    vt, k, difl, difr, z, poles, givptr, givcol, ldgcol, perm, givnum,
    c, s, work, iwork, info)
  • slalsa โ€” SLALSA computes the SVD of the coefficient matrix in compact form. Used by sgelsd.
subroutine slalsa (icompq, smlsiz, n, nrhs, b, ldb, bx, ldbx, u, ldu,
    vt, k, difl, difr, z, poles, givptr, givcol, ldgcol, perm, givnum,
    c, s, work, iwork, info)
  • zlalsa โ€” ZLALSA computes the SVD of the coefficient matrix in compact form. Used by sgelsd.
subroutine zlalsa (icompq, smlsiz, n, nrhs, b, ldb, bx, ldbx, u, ldu,
    vt, k, difl, difr, z, poles, givptr, givcol, ldgcol, perm, givnum,
    c, s, rwork, iwork, info)

๐Ÿฆ‹ DETAILED DESCRIPTION ๐Ÿฆ‹

okay so this is the "here's the whole vibe before we get into the receipts" section. Everything below in Function Documentation is the full โœจ lore โœจ for each of the four routines โ€” arguments, dimensions, all of it.


๐Ÿ’… FUNCTION DOCUMENTATION ๐Ÿ’…

๐Ÿ’œ clalsa

subroutine clalsa (integer icompq, integer smlsiz, integer n, integer nrhs,
    complex, dimension( ldb, * ) b, integer ldb, complex, dimension( ldbx, *
    ) bx, integer ldbx, 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( * ) rwork,
    integer, dimension( * ) iwork, integer info)

CLALSA computes the SVD of the coefficient matrix in compact form. Used by sgelsd.

๐Ÿ“ Purpose

okay so here's the whole point of CLALSA, no cap:

CLALSA is an intermediate step in solving the least squares problem by computing the SVD of the coefficient matrix in compact form (the singular vectors are computed as products of simple orthogonal matrices.). yes, compact โ€” the vectors don't get stored out all big and extra, they get stored as a lil product of simple orthogonal matrices. it's giving storage efficiency ๐Ÿ’…

if ICOMPQ = 0, CLALSA applies the inverse of the left singular vector matrix of an upper bidiagonal matrix to the right hand side; and if ICOMPQ = 1, CLALSA applies the right singular vector matrix to the right hand side. the singular vector matrices were generated in compact form by CLALSA. so it's a little circular, and honestly? iconic.

๐ŸŽ€ Parameters

  • ICOMPQ โ€” ICOMPQ is INTEGER. Specifies whether the left or the right singular vector matrix is involved.
    • = 0: Left singular vector matrix
    • = 1: Right singular vector matrix
  • SMLSIZ โ€” SMLSIZ is INTEGER. The maximum size of the subproblems at the bottom of the computation tree.
  • N โ€” N is INTEGER. The row and column dimensions of the upper bidiagonal matrix.
  • NRHS โ€” NRHS is INTEGER. The number of columns of B and BX. NRHS must be at least 1.
  • B โ€” B is COMPLEX array, dimension ( LDB, NRHS ). On input, B contains the right hand sides of the least squares problem in rows 1 through M. On output, B contains the solution X in rows 1 through N.
  • LDB โ€” LDB is INTEGER. The leading dimension of B in the calling subprogram. LDB must be at least max(1,MAX( M, N )).
  • BX โ€” BX is COMPLEX array, dimension ( LDBX, NRHS ). On exit, the result of applying the left or right singular vector matrix to B.
  • LDBX โ€” LDBX is INTEGER. The leading dimension of BX.
  • U โ€” U is REAL array, dimension ( LDU, SMLSIZ ). On entry, U contains the left singular vector matrices of all subproblems at the bottom level.
  • LDU โ€” LDU is INTEGER, LDU = > N. The leading dimension of arrays U, VT, DIFL, DIFR, POLES, GIVNUM, and Z.
yes bestie, LDU = > N is written exactly like that in the original. we do not touch it. we respect it. ๐Ÿซถ
  • VT โ€” VT is REAL array, dimension ( LDU, SMLSIZ+1 ). On entry, VT**H contains the right singular vector matrices of all subproblems at the bottom level.
  • K โ€” K is INTEGER array, dimension ( N ).
  • DIFL โ€” DIFL is REAL array, dimension ( LDU, NLVL ), where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
  • DIFR โ€” DIFR is REAL array, dimension ( LDU, 2 * NLVL ). On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record distances between singular values on the I-th level and singular values on the (I -1)-th level, and DIFR(*, 2 * I) record the normalizing factors of the right singular vectors matrices of subproblems on I-th level.
  • Z โ€” Z is REAL array, dimension ( LDU, NLVL ). On entry, Z(1, I) contains 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 ). On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old singular values involved in the secular equations on the I-th level.
  • GIVPTR โ€” GIVPTR is INTEGER array, dimension ( N ). On entry, 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 ). On entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records the locations of Givens rotations performed on the I-th level on the computation tree.
  • LDGCOL โ€” LDGCOL is INTEGER, LDGCOL = > N. The leading dimension of arrays GIVCOL and PERM.
  • PERM โ€” PERM is INTEGER array, dimension ( LDGCOL, NLVL ). On entry, PERM(*, I) records permutations done on the I-th level of the computation tree.
  • GIVNUM โ€” GIVNUM is REAL array, dimension ( LDU, 2 * NLVL ). On entry, GIVNUM(*, 2 *I -1 : 2 * I) records 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 ). On entry, if the I-th subproblem is not square, 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 ). On entry, if the I-th subproblem is not square, S( I ) contains the S-value of a Givens rotation related to the right null space of the I-th subproblem.
  • RWORK โ€” RWORK is REAL array, dimension at least MAX( (SMLSZ+1)*NRHS*3, N*(1+NRHS) + 2*NRHS ).
not me noticing it says SMLSZ and not SMLSIZ in that formula ๐Ÿ˜ญ that's literally how it's written, keep it, it's canon.
  • IWORK โ€” IWORK is INTEGER array, dimension (3*N).
  • INFO โ€” INFO is INTEGER
    • = 0: successful exit.
    • < 0: if INFO = -i, the i-th argument had an illegal value.

๐Ÿ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

๐ŸŒŸ Contributors:

Ming Gu and Ren-Cang Li, Computer Science Division, University of California at Berkeley, USA Osni Marques, LBNL/NERSC, USA

โญ Definition

Definition at line 263 of file clalsa.f.


๐Ÿ’™ dlalsa

subroutine dlalsa (integer icompq, integer smlsiz, integer n, integer nrhs,
    double precision, dimension( ldb, * ) b, integer ldb, double precision,
    dimension( ldbx, * ) bx, integer ldbx, 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)

DLALSA computes the SVD of the coefficient matrix in compact form. Used by sgelsd.

๐Ÿ“ Purpose

DLALSA is an intermediate step in solving the least squares problem by computing the SVD of the coefficient matrix in compact form (the singular vectors are computed as products of simple orthogonal matrices.).

if ICOMPQ = 0, DLALSA applies the inverse of the left singular vector matrix of an upper bidiagonal matrix to the right hand side; and if ICOMPQ = 1, DLALSA applies the right singular vector matrix to the right hand side. the singular vector matrices were generated in compact form by DLALSA. same routine, double the precision, same slay ๐Ÿ’…

๐ŸŽ€ Parameters

  • ICOMPQ โ€” ICOMPQ is INTEGER. Specifies whether the left or the right singular vector matrix is involved.
    • = 0: Left singular vector matrix
    • = 1: Right singular vector matrix
  • SMLSIZ โ€” SMLSIZ is INTEGER. The maximum size of the subproblems at the bottom of the computation tree.
  • N โ€” N is INTEGER. The row and column dimensions of the upper bidiagonal matrix.
  • NRHS โ€” NRHS is INTEGER. The number of columns of B and BX. NRHS must be at least 1.
  • B โ€ฆ

aaand that is exactly where this part of the page stops ๐Ÿซถ dlalsa has more argument tea to spill, and part 2 picks it right back up at B โ€” do not touch that dial, bestie ๐Ÿ’–

  • B โ€” DOUBLE PRECISION array, dimension ( LDB, NRHS ). On input, bestie, B is carrying the right hand sides of the least squares problem in rows 1 through M. On output itโ€™s giving solution era: B contains the solution X in rows 1 through N. ๐Ÿ’–
  • LDB โ€” INTEGER. The leading dimension of B in the calling subprogram. LDB must be at least max(1,MAX( M, N )). no cap, check it.
  • BX โ€” DOUBLE PRECISION array, dimension ( LDBX, NRHS ). On exit, this is the result of applying the left or right singular vector matrix to B. โœจ
  • LDBX โ€” INTEGER. The leading dimension of BX.
  • U โ€” DOUBLE PRECISION array, dimension ( LDU, SMLSIZ ). On entry, 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.
  • VT โ€” DOUBLE PRECISION array, dimension ( LDU, SMLSIZ+1 ). On entry, VT**T contains the right singular vector matrices of all subproblems at the bottom level.
  • K โ€” INTEGER array, dimension ( N ). Thatโ€™s it, thatโ€™s the whole note. ๐ŸŽ€
  • DIFL โ€” DOUBLE PRECISION array, dimension ( LDU, NLVL ), where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
  • DIFR โ€” DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ). On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record distances between singular values on the I-th level and singular values on the (I -1)-th level, and DIFR(*, 2 * I) record the normalizing factors of the right singular vectors matrices of subproblems on I-th level.
  • Z โ€” DOUBLE PRECISION array, dimension ( LDU, NLVL ). On entry, Z(1, I) contains the components of the deflation-adjusted updating row vector for subproblems on the I-th level.
  • POLES โ€” DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ). On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old singular values involved in the secular equations on the I-th level.
  • GIVPTR โ€” INTEGER array, dimension ( N ). On entry, 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 ). On entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records 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 ). On entry, PERM(*, I) records permutations done on the I-th level of the computation tree.
  • GIVNUM โ€” DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ). On entry, GIVNUM(*, 2 *I -1 : 2 * I) records the C- and S-values of Givens rotations performed on the I-th level on the computation tree.
  • C โ€” DOUBLE PRECISION array, dimension ( N ). On entry, if the I-th subproblem is not square, 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 ). On entry, if the I-th subproblem is not square, S( I ) contains the S-value of a Givens rotation related to the right null space of the I-th subproblem.
  • WORK โ€” DOUBLE PRECISION array, dimension (N). No extra lore, just vibes. ๐Ÿ’…
  • IWORK โ€” INTEGER array, dimension (3*N). Same energy, just the integer work array.
  • INFO โ€” INTEGER. = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value.

๐Ÿ‘‘ Author

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

๐ŸŒŸ Contributors:

  • Ming Gu and Ren-Cang Li, Computer Science Division, University of California at Berkeley, USA
  • Osni Marques, LBNL/NERSC, USA

Definition at line 263 of file dlalsa.f.


๐Ÿฆ‹ subroutine slalsa ๐Ÿฆ‹

subroutine slalsa (integer icompq, integer smlsiz, integer n, integer nrhs, real, dimension( ldb, * ) b, integer ldb, real, dimension( ldbx, * ) bx, integer ldbx, 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)

SLALSA computes the SVD of the coefficient matrix in compact form. Used by sgelsd. periodt. โœจ

๐ŸŽฏ Purpose

SLALSA is an intermediate step in solving the least squares problem by computing the SVD of the coefficient matrix in compact form (The singular vectors are computed as products of simple orthogonal matrices.).

If ICOMPQ = 0, SLALSA applies the inverse of the left singular vector matrix of an upper bidiagonal matrix to the right hand side; and if ICOMPQ = 1, SLALSA applies the right singular vector matrix to the right hand side. The singular vector matrices were generated in compact form by SLALSA.

๐Ÿงฎ Parameters

  • ICOMPQ โ€” INTEGER. Specifies whether the left or the right singular vector matrix is involved. = 0: Left singular vector matrix. = 1: Right singular vector matrix.
  • SMLSIZ โ€” INTEGER. The maximum size of the subproblems at the bottom of the computation tree.
  • N โ€” INTEGER. The row and column dimensions of the upper bidiagonal matrix.
  • NRHS โ€” INTEGER. The number of columns of B and BX. NRHS must be at least 1.
  • B โ€” REAL array, dimension ( LDB, NRHS ). On input, B contains the right hand sides of the least squares problem in rows 1 through M. On output, B contains the solution X in rows 1 through N.
  • LDB โ€” INTEGER. The leading dimension of B in the calling subprogram. LDB must be at least max(1,MAX( M, N )).
  • BX โ€” REAL array, dimension ( LDBX, NRHS ). On exit, the result of applying the left or right singular vector matrix to B.
  • LDBX โ€” INTEGER. The leading dimension of BX.
  • U โ€” REAL array, dimension ( LDU, SMLSIZ ). On entry, 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.
  • VT โ€” REAL array, dimension ( LDU, SMLSIZ+1 ). On entry, VT**T contains the right singular vector matrices of all subproblems at the bottom level.
  • K โ€” INTEGER array, dimension ( N ).
  • DIFL โ€” REAL array, dimension ( LDU, NLVL ), where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
  • DIFR โ€” REAL array, dimension ( LDU, 2 * NLVL ). On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record distances between singular values on the I-th level and singular values on the (I -1)-th level, and DIFR(*, 2 * I) record the normalizing factors of the right singular vectors matrices of subproblems on I-th level.
  • Z โ€” REAL array, dimension ( LDU, NLVL ). On entry, Z(1, I) contains the components of the deflation-adjusted updating row vector for subproblems on the I-th level.
  • POLES โ€” REAL array, dimension ( LDU, 2 * NLVL ). On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old singular values involved in the secular equations on the I-th level.
  • GIVPTR โ€” INTEGER array, dimension ( N ). On entry, 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 ). On entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records 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 ). On entry, PERM(*, I) records permutations done on the I-th level of the computation tree.
  • GIVNUM โ€” and thatโ€™s literally where this part of the page cuts off, bestie ๐Ÿ˜ญ no description yet.
  • GIVNUM โ€” DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ). On entry, GIVNUM(*, 2 *I -1 : 2 * I) records the C- and S-values of Givens rotations performed on the I-th level on the computation tree. Bestie, it's literally the receipts of every rotation. ๐Ÿ’…

  • C โ€” DOUBLE PRECISION array, dimension ( N ). On entry, if the I-th subproblem is not square, 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 ). On entry, if the I-th subproblem is not square, S( I ) contains the S-value of a Givens rotation related to the right null space of the I-th subproblem. The matching twin to C, no cap. ๐ŸŒธ
  • WORK โ€” REAL array, dimension (N). Just vibes and scratch space. โœจ
  • IWORK โ€” INTEGER array, dimension (3*N). The integer-flavoured scratch pad, three N's worth. ๐Ÿงš
  • INFO โ€” INTEGER. The little status report at the end:
    • = 0: successful exit. Slay. โœ…
    • < 0: if INFO = -i, the i-th argument had an illegal value. Rude. Someone passed in nonsense. ๐Ÿ’€

๐Ÿ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

๐Ÿซถ Contributors:

Ming Gu and Ren-Cang Li, Computer Science Division, University of California at Berkeley, USA Osni Marques, LBNL/NERSC, USA

Definition at line 263 of file slalsa.f.


๐ŸŒˆ subroutine zlalsa

Okay bestie, this one's the complex-16 sibling and it is serving the same energy. Here's the signature, verbatim, do not touch:

subroutine zlalsa (integer icompq, integer smlsiz, integer n, integer nrhs,
    complex*16, dimension( ldb, * ) b, integer ldb, complex*16, dimension(
    ldbx, * ) bx, integer ldbx, 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( * ) rwork, integer,
    dimension( * ) iwork, integer info)

ZLALSA computes the SVD of the coefficient matrix in compact form. Used by sgelsd. (Yes โ€” it says sgelsd right there in the original. Not me, not my typo, I'm just the messenger. ๐Ÿซก)

๐Ÿ’œ Purpose:

ZLALSA is an intermediate step in solving the least squares problem by computing the SVD of the coefficient matrix in compact form (The singular vectors are computed as products of simple orthogonal matrices.).
If ICOMPQ = 0, ZLALSA applies the inverse of the left singular vector matrix of an upper bidiagonal matrix to the right hand side; and if ICOMPQ = 1, ZLALSA applies the right singular vector matrix to the right hand side. The singular vector matrices were generated in compact form by ZLALSA.

Not me reading "generated in compact form by ZLALSA" and realizing ZLALSA called itself. Main character energy fr. ๐Ÿ’…

๐Ÿฆ‹ Parameters

  • ICOMPQ โ€” INTEGER. Specifies whether the left or the right singular vector matrix is involved:
    • = 0: Left singular vector matrix
    • = 1: Right singular vector matrix

So like, pick a side. ๐Ÿ‘‘

  • SMLSIZ โ€” INTEGER. The maximum size of the subproblems at the bottom of the computation tree. The tiny leaf babies. ๐Ÿ“
  • N โ€” INTEGER. The row and column dimensions of the upper bidiagonal matrix.
  • NRHS โ€” INTEGER. The number of columns of B and BX. NRHS must be at least 1. At least 1! Don't come in here with zero. ๐Ÿ™ˆ
  • B โ€” COMPLEX*16 array, dimension ( LDB, NRHS ). On input, B contains the right hand sides of the least squares problem in rows 1 through M. On output, B contains the solution X in rows 1 through N. It goes in one thing and comes out a whole other thing โ€” glow-up, honestly. โœจ
  • LDB โ€” INTEGER. The leading dimension of B in the calling subprogram. LDB must be at least max(1,MAX( M, N )). Do not skimp. ๐ŸŽ€
  • BX โ€” COMPLEX*16 array, dimension ( LDBX, NRHS ). On exit, the result of applying the left or right singular vector matrix to B.
  • LDBX โ€” INTEGER. The leading dimension of BX.
  • U โ€” DOUBLE PRECISION array, dimension ( LDU, SMLSIZ ). On entry, 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. It's carrying literally all of them on its back. ๐Ÿ˜ญ
  • VT โ€” DOUBLE PRECISION array, dimension ( LDU, SMLSIZ+1 ). On entry, VT**H contains the right singular vector matrices of all subproblems at the bottom level. Yes that's the conjugate-transpose, iykyk. ๐ŸŒธ
  • K โ€” INTEGER array, dimension ( N ).
  • DIFL โ€” DOUBLE PRECISION array, dimension ( LDU, NLVL ), where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1. A little log for your troubles. ๐Ÿงฎ
  • DIFR โ€” DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ). On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record distances between singular values on the I-th level and singular values on the (I -1)-th level, and DIFR(*, 2 * I) record the normalizing factors of the right singular vectors matrices of subproblems on I-th level. It's giving family tree but for singular values. ๐ŸŒˆ
  • Z โ€” DOUBLE PRECISION array, dimension ( LDU, NLVL ). On entry, Z(1, I) contains the components of the deflation-adjusted updating row vector for subproblems on the I-th level.
  • POLES โ€” DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ). On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old singular values involved in the secular equations on the I-th level. New and old โ€” the whole timeline. ๐Ÿ’€
  • GIVPTR โ€” INTEGER array, dimension ( N ). On entry, GIVPTR( I ) records the number of Givens rotations performed on the I-th problem on the computation tree. A little counter of spinny things. ๐Ÿ”ฅ
  • GIVCOL โ€” INTEGER array, dimension ( LDGCOL, 2 * NLVL ). On entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records 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 ). On entry, PERM(*, I) records permutations done on the I-th level of the computation tree. Reordering, but make it fashion. ๐Ÿ’…
  • GIVNUM โ€” DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ). On entry, GIVNUM(*, 2 *I -1 : 2 * I) records the C- and S-values of Givens rotations performed on the I-th level on the computation tree. Same as its single-precision-ish cousin, now with extra double precision. โœจ
  • C โ€” DOUBLE PRECISION array, dimension ( N ). On entry, if the I-th subproblem is not square, 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 ). On entry, if the I-th subproblem is not square, S( I ) contains the S-value of a Givens rotation related to the right null space of the I-th subproblem. C and S, always together, never apart. ๐Ÿซถ
  • RWORK โ€” DOUBLE PRECISION array, dimension at least MAX( (SMLSZ+1)*NRHS*3, N*(1+NRHS) + 2*NRHS ). Note the spelling โ€” it says SMLSZ in the original, not SMLSIZ. Keep it exactly, bestie, that's a real character-for-character thing. ๐Ÿ“Œ
  • IWORK โ€” INTEGER array, dimension (3*N).
  • INFO โ€” INTEGER. The final verdict:
    • = 0: successful exit. We ate. โœ…
    • < 0: if INFO = -i, the i-th argument had an illegal value. Someone handed it a cursed argument and it's telling on them. ๐Ÿ˜ญ

๐Ÿ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

๐Ÿซถ Contributors:

Ming Gu and Ren-Cang Li, Computer Science Division, University of California at Berkeley, USA Osni Marques, LBNL/NERSC, USA

Definition at line 263 of file zlalsa.f.


Tiny side note from the original page: it also says it was generated automatically by Doxygen for LAPACK from the source code. So like, this whole thing was auto-built, not hand-written, which honestly? Respect the pipeline. ๐Ÿค–๐Ÿ’–

And that's a wrap, bestie!! ๐Ÿ’–โœจ This page is from LAPACK, Version 3.12.0, and the footer date/identifier is lalsa(3) โ€” go forth and decompose those singular values responsibly. ๐ŸŽ€๐Ÿฆ‹๐Ÿ’…

๐Ÿ“ฆ where this page comes from