lalsa#
Functions
-
void slalsa(const INT icompq, const INT smlsiz, const INT n, const INT nrhs, f32 *restrict B, const INT ldb, f32 *restrict BX, const INT ldbx, const f32 *restrict U, const INT ldu, const f32 *restrict VT, const INT *restrict K, const f32 *restrict difl, const f32 *restrict difr, const f32 *restrict Z, const f32 *restrict poles, const INT *restrict givptr, const INT *restrict givcol, const INT ldgcol, const INT *restrict perm, const f32 *restrict givnum, const f32 *restrict C, const f32 *restrict S, f32 *restrict work, INT *restrict iwork, INT *info)#
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
inicompqSpecifies whether left or right singular vector matrix: = 0: Left singular vector matrix = 1: Right singular vector matrix
insmlsizThe maximum size of subproblems at the bottom of the tree.
innThe row and column dimensions of the upper bidiagonal matrix.
innrhsThe number of columns of B and BX. nrhs >= 1.
inoutBArray of dimension (ldb, nrhs). On input, contains the right hand sides. On output, contains the solution X.
inldbThe leading dimension of B. ldb >= max(1, n).
outBXArray of dimension (ldbx, nrhs). Workspace.
inldbxThe leading dimension of BX.
inUArray of dimension (ldu, smlsiz). Left singular vector matrices of subproblems at bottom level.
inlduThe leading dimension of U, VT, DIFL, DIFR, POLES, GIVNUM, Z. ldu >= n.
inVTArray of dimension (ldu, smlsiz+1). VT^T contains right singular vector matrices at bottom level.
inKInteger array of dimension n.
indiflArray of dimension (ldu, nlvl).
indifrArray of dimension (ldu, 2*nlvl).
inZArray of dimension (ldu, nlvl).
inpolesArray of dimension (ldu, 2*nlvl).
ingivptrInteger array of dimension n.
ingivcolInteger array of dimension (ldgcol, 2*nlvl).
inldgcolLeading dimension of givcol and perm. ldgcol >= n.
inpermInteger array of dimension (ldgcol, nlvl).
ingivnumArray of dimension (ldu, 2*nlvl).
inCArray of dimension n.
inSArray of dimension n.
outworkArray of dimension n.
outiworkInteger array of dimension 3*n.
outinfo= 0: successful exit.
< 0: if info = -i, the i-th argument had illegal value.
void slalsa(
const INT icompq,
const INT smlsiz,
const INT n,
const INT nrhs,
f32* restrict B,
const INT ldb,
f32* restrict BX,
const INT ldbx,
const f32* restrict U,
const INT ldu,
const f32* restrict VT,
const INT* restrict K,
const f32* restrict difl,
const f32* restrict difr,
const f32* restrict Z,
const f32* restrict poles,
const INT* restrict givptr,
const INT* restrict givcol,
const INT ldgcol,
const INT* restrict perm,
const f32* restrict givnum,
const f32* restrict C,
const f32* restrict S,
f32* restrict work,
INT* restrict iwork,
INT* info
);
Functions
-
void dlalsa(const INT icompq, const INT smlsiz, const INT n, const INT nrhs, f64 *restrict B, const INT ldb, f64 *restrict BX, const INT ldbx, const f64 *restrict U, const INT ldu, const f64 *restrict VT, const INT *restrict K, const f64 *restrict difl, const f64 *restrict difr, const f64 *restrict Z, const f64 *restrict poles, const INT *restrict givptr, const INT *restrict givcol, const INT ldgcol, const INT *restrict perm, const f64 *restrict givnum, const f64 *restrict C, const f64 *restrict S, f64 *restrict work, INT *restrict iwork, INT *info)#
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.
Parameters
inicompqSpecifies whether left or right singular vector matrix: = 0: Left singular vector matrix = 1: Right singular vector matrix
insmlsizThe maximum size of subproblems at the bottom of the tree.
innThe row and column dimensions of the upper bidiagonal matrix.
innrhsThe number of columns of B and BX. nrhs >= 1.
inoutBArray of dimension (ldb, nrhs). On input, contains the right hand sides. On output, contains the solution X.
inldbThe leading dimension of B. ldb >= max(1, n).
outBXArray of dimension (ldbx, nrhs). Workspace.
inldbxThe leading dimension of BX.
inUArray of dimension (ldu, smlsiz). Left singular vector matrices of subproblems at bottom level.
inlduThe leading dimension of U, VT, DIFL, DIFR, POLES, GIVNUM, Z. ldu >= n.
inVTArray of dimension (ldu, smlsiz+1). VT^T contains right singular vector matrices at bottom level.
inKInteger array of dimension n.
indiflArray of dimension (ldu, nlvl).
indifrArray of dimension (ldu, 2*nlvl).
inZArray of dimension (ldu, nlvl).
inpolesArray of dimension (ldu, 2*nlvl).
ingivptrInteger array of dimension n.
ingivcolInteger array of dimension (ldgcol, 2*nlvl).
inldgcolLeading dimension of givcol and perm. ldgcol >= n.
inpermInteger array of dimension (ldgcol, nlvl).
ingivnumArray of dimension (ldu, 2*nlvl).
inCArray of dimension n.
inSArray of dimension n.
outworkArray of dimension n.
outiworkInteger array of dimension 3*n.
outinfo= 0: successful exit.
< 0: if info = -i, the i-th argument had illegal value.
void dlalsa(
const INT icompq,
const INT smlsiz,
const INT n,
const INT nrhs,
f64* restrict B,
const INT ldb,
f64* restrict BX,
const INT ldbx,
const f64* restrict U,
const INT ldu,
const f64* restrict VT,
const INT* restrict K,
const f64* restrict difl,
const f64* restrict difr,
const f64* restrict Z,
const f64* restrict poles,
const INT* restrict givptr,
const INT* restrict givcol,
const INT ldgcol,
const INT* restrict perm,
const f64* restrict givnum,
const f64* restrict C,
const f64* restrict S,
f64* restrict work,
INT* restrict iwork,
INT* info
);
Functions
-
void clalsa(const INT icompq, const INT smlsiz, const INT n, const INT nrhs, c64 *restrict B, const INT ldb, c64 *restrict BX, const INT ldbx, const f32 *restrict U, const INT ldu, const f32 *restrict VT, const INT *restrict K, const f32 *restrict difl, const f32 *restrict difr, const f32 *restrict Z, const f32 *restrict poles, const INT *restrict givptr, const INT *restrict givcol, const INT ldgcol, const INT *restrict perm, const f32 *restrict givnum, const f32 *restrict C, const f32 *restrict S, f32 *restrict rwork, INT *restrict iwork, INT *info)#
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.).
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.
Parameters
inicompqSpecifies whether the left or the right singular vector matrix is involved. = 0: Left singular vector matrix = 1: Right singular vector matrix
insmlsizThe maximum size of the subproblems at the bottom of the computation tree.
innThe row and column dimensions of the upper bidiagonal matrix.
innrhsThe number of columns of B and BX. nrhs must be at least 1.
inoutBComplex 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.
inldbThe leading dimension of B in the calling subprogram. ldb must be at least max(1, max(M, N)).
outBXComplex array, dimension (ldbx, nrhs). On exit, the result of applying the left or right singular vector matrix to B.
inldbxThe leading dimension of BX.
inUDouble array, dimension (ldu, smlsiz). On entry, U contains the left singular vector matrices of all subproblems at the bottom level.
inlduThe leading dimension of arrays U, VT, DIFL, DIFR, POLES, GIVNUM, and Z. ldu >= N.
inVTDouble array, dimension (ldu, smlsiz+1). On entry, VT**H contains the right singular vector matrices of all subproblems at the bottom level.
inKInteger array, dimension (N).
indiflDouble array, dimension (ldu, nlvl). where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
indifrDouble 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.
inZDouble 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.
inpolesDouble 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.
ingivptrInteger array, dimension (N). On entry, GIVPTR(I) records the number of Givens rotations performed on the I-th problem on the computation tree.
ingivcolInteger 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.
inldgcolThe leading dimension of arrays GIVCOL and PERM. ldgcol >= N.
inpermInteger array, dimension (ldgcol, nlvl). On entry, PERM(*, I) records permutations done on the I-th level of the computation tree.
ingivnumDouble 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.
inCDouble 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.
inSDouble 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.
outrworkDouble array, dimension at least max((SMLSIZ+1)*NRHS*3, N*(1+NRHS) + 2*NRHS).
outiworkInteger array, dimension (3*N).
outinfo= 0: successful exit. < 0: if info = -i, the i-th argument had an illegal value.
void clalsa(
const INT icompq,
const INT smlsiz,
const INT n,
const INT nrhs,
c64* restrict B,
const INT ldb,
c64* restrict BX,
const INT ldbx,
const f32* restrict U,
const INT ldu,
const f32* restrict VT,
const INT* restrict K,
const f32* restrict difl,
const f32* restrict difr,
const f32* restrict Z,
const f32* restrict poles,
const INT* restrict givptr,
const INT* restrict givcol,
const INT ldgcol,
const INT* restrict perm,
const f32* restrict givnum,
const f32* restrict C,
const f32* restrict S,
f32* restrict rwork,
INT* restrict iwork,
INT* info
);
Functions
-
void zlalsa(const INT icompq, const INT smlsiz, const INT n, const INT nrhs, c128 *restrict B, const INT ldb, c128 *restrict BX, const INT ldbx, const f64 *restrict U, const INT ldu, const f64 *restrict VT, const INT *restrict K, const f64 *restrict difl, const f64 *restrict difr, const f64 *restrict Z, const f64 *restrict poles, const INT *restrict givptr, const INT *restrict givcol, const INT ldgcol, const INT *restrict perm, const f64 *restrict givnum, const f64 *restrict C, const f64 *restrict S, f64 *restrict rwork, INT *restrict iwork, INT *info)#
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.
Parameters
inicompqSpecifies whether the left or the right singular vector matrix is involved. = 0: Left singular vector matrix = 1: Right singular vector matrix
insmlsizThe maximum size of the subproblems at the bottom of the computation tree.
innThe row and column dimensions of the upper bidiagonal matrix.
innrhsThe number of columns of B and BX. nrhs must be at least 1.
inoutBComplex 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.
inldbThe leading dimension of B in the calling subprogram. ldb must be at least max(1, max(M, N)).
outBXComplex array, dimension (ldbx, nrhs). On exit, the result of applying the left or right singular vector matrix to B.
inldbxThe leading dimension of BX.
inUDouble array, dimension (ldu, smlsiz). On entry, U contains the left singular vector matrices of all subproblems at the bottom level.
inlduThe leading dimension of arrays U, VT, DIFL, DIFR, POLES, GIVNUM, and Z. ldu >= N.
inVTDouble array, dimension (ldu, smlsiz+1). On entry, VT**H contains the right singular vector matrices of all subproblems at the bottom level.
inKInteger array, dimension (N).
indiflDouble array, dimension (ldu, nlvl). where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
indifrDouble 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.
inZDouble 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.
inpolesDouble 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.
ingivptrInteger array, dimension (N). On entry, GIVPTR(I) records the number of Givens rotations performed on the I-th problem on the computation tree.
ingivcolInteger 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.
inldgcolThe leading dimension of arrays GIVCOL and PERM. ldgcol >= N.
inpermInteger array, dimension (ldgcol, nlvl). On entry, PERM(*, I) records permutations done on the I-th level of the computation tree.
ingivnumDouble 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.
inCDouble 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.
inSDouble 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.
outrworkDouble array, dimension at least max((SMLSIZ+1)*NRHS*3, N*(1+NRHS) + 2*NRHS).
outiworkInteger array, dimension (3*N).
outinfo= 0: successful exit. < 0: if info = -i, the i-th argument had an illegal value.
void zlalsa(
const INT icompq,
const INT smlsiz,
const INT n,
const INT nrhs,
c128* restrict B,
const INT ldb,
c128* restrict BX,
const INT ldbx,
const f64* restrict U,
const INT ldu,
const f64* restrict VT,
const INT* restrict K,
const f64* restrict difl,
const f64* restrict difr,
const f64* restrict Z,
const f64* restrict poles,
const INT* restrict givptr,
const INT* restrict givcol,
const INT ldgcol,
const INT* restrict perm,
const f64* restrict givnum,
const f64* restrict C,
const f64* restrict S,
f64* restrict rwork,
INT* restrict iwork,
INT* info
);