lals0#
Functions
-
void slals0(const INT icompq, const INT nl, const INT nr, const INT sqre, const INT nrhs, f32 *restrict B, const INT ldb, f32 *restrict BX, const INT ldbx, const INT *restrict perm, const INT givptr, const INT *restrict givcol, const INT ldgcol, const f32 *restrict givnum, const INT ldgnum, const f32 *restrict poles, const f32 *restrict difl, const f32 *restrict difr, const f32 *restrict Z, const INT k, const f32 c, const f32 s, f32 *restrict work, INT *info)#
SLALS0 applies back the multiplying factors of either the left or the right singular vector matrix of a diagonal matrix appended by a row to the right hand side matrix B in solving the least squares problem using the divide-and-conquer SVD approach.
For the left singular vector matrix, three types of orthogonal matrices are involved:
For the right singular vector matrix, four types of orthogonal matrices are involved:(1L) Givens rotations: the number of such rotations is GIVPTR; the pairs of columns/rows they were applied to are stored in GIVCOL; and the C- and S-values of these rotations are stored in GIVNUM. (2L) Permutation. The (NL+1)-st row of B is to be moved to the first row, and for J=2:N, PERM(J)-th row of B is to be moved to the J-th row. (3L) The left singular vector matrix of the remaining matrix.(1R) The right singular vector matrix of the remaining matrix. (2R) If SQRE = 1, one extra Givens rotation to generate the right null space. (3R) The inverse transformation of (2L). (4R) The inverse transformation of (1L).- Contributors:
- Ming Gu and Ren-Cang Li, Computer Science Division, University of California at Berkeley, USAOsni Marques, LBNL/NERSC, USA
Parameters
inicompqSpecifies whether singular vectors are to be computed in factored form:
icompq=0: Left singular vector matrix.icompq=1: Right singular vector matrix.innlThe row dimension of the upper block.
nl>=1.innrThe row dimension of the lower block.
nr>=1.insqresqre=0: the lower block is annr-by-nrsquare matrix.sqre=1: the lower block is annr-by-(nr+1)rectangular matrix. The bidiagonal matrix has row dimensionn = nl+nr+1, and column dimensionm = n+sqre.innrhsThe number of columns of
BandBX.nrhsmust be at least 1.inoutBReal array of dimension (
ldb,nrhs). On input,Bcontains the right hand sides of the least squares problem in rows0throughm-1. On output,Bcontains the solution X in rows0throughn-1.inldbThe leading dimension of
B.ldbmust be at leastmax(1,max(m,n)).outBXReal array of dimension (
ldbx,nrhs).inldbxThe leading dimension of
BX.inpermInteger array of dimension (
n). The permutations (from deflation and sorting) applied to the two blocks.ingivptrThe number of Givens rotations which took place in this subproblem.
ingivcolInteger array of dimension (
ldgcol, 2). Each pair of numbers indicates a pair of rows/columns involved in a Givens rotation.inldgcolThe leading dimension of
givcol, must be at leastn.ingivnumReal array of dimension (
ldgnum, 2). Each number indicates the C or S value used in the corresponding Givens rotation.inldgnumThe leading dimension of arrays
difr,polesandgivnum, must be at leastk.inpolesReal array of dimension (
ldgnum, 2). On entry,poles[0:k-1,0]is an array containing the old singular values which will be used to form the secular equation in SLASD4;poles[0:k-1,1]is an array containing the new singular values obtained from solving the secular equation.indiflReal array of dimension (
k). On entry,difl[i]is the distance between i-th updated (undeflated) singular value and the i-th (undeflated) old singular value.indifrReal array of dimension (
ldgnum, 2). On entry,difr[i,0]contains the distances between i-th updated (undeflated) singular value and the (i+1)-th (undeflated) old singular value. Anddifr[i,1]is the normalizing factor for the i-th right singular vector.inZReal array of dimension (
k). Contain the components of the deflation-adjusted updating row vector.inkContains the dimension of the non-deflated matrix, This is the order of the related secular equation.
1<=k<=n.incccontains garbage ifsqre=0and the C-value of a Givens rotation related to the right null space ifsqre=1.insscontains garbage ifsqre=0and the S-value of a Givens rotation related to the right null space ifsqre=1.outworkReal array of dimension (
k).outinfoinfo=0: successful exit.info<0: ifinfo=-i, the i-th argument had an illegal value.
void slals0(
const INT icompq,
const INT nl,
const INT nr,
const INT sqre,
const INT nrhs,
f32* restrict B,
const INT ldb,
f32* restrict BX,
const INT ldbx,
const INT* restrict perm,
const INT givptr,
const INT* restrict givcol,
const INT ldgcol,
const f32* restrict givnum,
const INT ldgnum,
const f32* restrict poles,
const f32* restrict difl,
const f32* restrict difr,
const f32* restrict Z,
const INT k,
const f32 c,
const f32 s,
f32* restrict work,
INT* info
);
Functions
-
void dlals0(const INT icompq, const INT nl, const INT nr, const INT sqre, const INT nrhs, f64 *restrict B, const INT ldb, f64 *restrict BX, const INT ldbx, const INT *restrict perm, const INT givptr, const INT *restrict givcol, const INT ldgcol, const f64 *restrict givnum, const INT ldgnum, const f64 *restrict poles, const f64 *restrict difl, const f64 *restrict difr, const f64 *restrict Z, const INT k, const f64 c, const f64 s, f64 *restrict work, INT *info)#
DLALS0 applies back the multiplying factors of either the left or the right singular vector matrix of a diagonal matrix appended by a row to the right hand side matrix B in solving the least squares problem using the divide-and-conquer SVD approach.
For the left singular vector matrix, three types of orthogonal matrices are involved:
For the right singular vector matrix, four types of orthogonal matrices are involved:(1L) Givens rotations: the number of such rotations is GIVPTR; the pairs of columns/rows they were applied to are stored in GIVCOL; and the C- and S-values of these rotations are stored in GIVNUM. (2L) Permutation. The (NL+1)-st row of B is to be moved to the first row, and for J=2:N, PERM(J)-th row of B is to be moved to the J-th row. (3L) The left singular vector matrix of the remaining matrix.(1R) The right singular vector matrix of the remaining matrix. (2R) If SQRE = 1, one extra Givens rotation to generate the right null space. (3R) The inverse transformation of (2L). (4R) The inverse transformation of (1L).- Contributors:
- Ming Gu and Ren-Cang Li, Computer Science Division, University of California at Berkeley, USAOsni Marques, LBNL/NERSC, USA
Parameters
inicompqSpecifies whether singular vectors are to be computed in factored form:
icompq=0: Left singular vector matrix.icompq=1: Right singular vector matrix.innlThe row dimension of the upper block.
nl>=1.innrThe row dimension of the lower block.
nr>=1.insqresqre=0: the lower block is annr-by-nrsquare matrix.sqre=1: the lower block is annr-by-(nr+1)rectangular matrix. The bidiagonal matrix has row dimensionn = nl+nr+1, and column dimensionm = n+sqre.innrhsThe number of columns of
BandBX.nrhsmust be at least 1.inoutBReal array of dimension (
ldb,nrhs). On input,Bcontains the right hand sides of the least squares problem in rows0throughm-1. On output,Bcontains the solution X in rows0throughn-1.inldbThe leading dimension of
B.ldbmust be at leastmax(1,max(m,n)).outBXReal array of dimension (
ldbx,nrhs).inldbxThe leading dimension of
BX.inpermInteger array of dimension (
n). The permutations (from deflation and sorting) applied to the two blocks.ingivptrThe number of Givens rotations which took place in this subproblem.
ingivcolInteger array of dimension (
ldgcol, 2). Each pair of numbers indicates a pair of rows/columns involved in a Givens rotation.inldgcolThe leading dimension of
givcol, must be at leastn.ingivnumReal array of dimension (
ldgnum, 2). Each number indicates the C or S value used in the corresponding Givens rotation.inldgnumThe leading dimension of arrays
difr,polesandgivnum, must be at leastk.inpolesReal array of dimension (
ldgnum, 2). On entry,poles[0:k-1,0]is an array containing the old singular values which will be used to form the secular equation in DLASD4;poles[0:k-1,1]is an array containing the new singular values obtained from solving the secular equation.indiflReal array of dimension (
k). On entry,difl[i]is the distance between i-th updated (undeflated) singular value and the i-th (undeflated) old singular value.indifrReal array of dimension (
ldgnum, 2). On entry,difr[i,0]contains the distances between i-th updated (undeflated) singular value and the (i+1)-th (undeflated) old singular value. Anddifr[i,1]is the normalizing factor for the i-th right singular vector.inZReal array of dimension (
k). Contain the components of the deflation-adjusted updating row vector.inkContains the dimension of the non-deflated matrix, This is the order of the related secular equation.
1<=k<=n.incccontains garbage ifsqre=0and the C-value of a Givens rotation related to the right null space ifsqre=1.insscontains garbage ifsqre=0and the S-value of a Givens rotation related to the right null space ifsqre=1.outworkReal array of dimension (
k).outinfoinfo=0: successful exit.info<0: ifinfo=-i, the i-th argument had an illegal value.
void dlals0(
const INT icompq,
const INT nl,
const INT nr,
const INT sqre,
const INT nrhs,
f64* restrict B,
const INT ldb,
f64* restrict BX,
const INT ldbx,
const INT* restrict perm,
const INT givptr,
const INT* restrict givcol,
const INT ldgcol,
const f64* restrict givnum,
const INT ldgnum,
const f64* restrict poles,
const f64* restrict difl,
const f64* restrict difr,
const f64* restrict Z,
const INT k,
const f64 c,
const f64 s,
f64* restrict work,
INT* info
);
Functions
-
void clals0(const INT icompq, const INT nl, const INT nr, const INT sqre, const INT nrhs, c64 *restrict B, const INT ldb, c64 *restrict BX, const INT ldbx, const INT *restrict perm, const INT givptr, const INT *restrict givcol, const INT ldgcol, const f32 *restrict givnum, const INT ldgnum, const f32 *restrict poles, const f32 *restrict difl, const f32 *restrict difr, const f32 *restrict Z, const INT k, const f32 c, const f32 s, f32 *restrict rwork, INT *info)#
CLALS0 applies back the multiplying factors of either the left or the right singular vector matrix of a diagonal matrix appended by a row to the right hand side matrix B in solving the least squares problem using the divide-and-conquer SVD approach.
For the left singular vector matrix, three types of orthogonal matrices are involved:
For the right singular vector matrix, four types of orthogonal matrices are involved:(1L) Givens rotations: the number of such rotations is GIVPTR; the pairs of columns/rows they were applied to are stored in GIVCOL; and the C- and S-values of these rotations are stored in GIVNUM. (2L) Permutation. The (NL+1)-st row of B is to be moved to the first row, and for J=2:N, PERM(J)-th row of B is to be moved to the J-th row. (3L) The left singular vector matrix of the remaining matrix.(1R) The right singular vector matrix of the remaining matrix. (2R) If SQRE = 1, one extra Givens rotation to generate the right null space. (3R) The inverse transformation of (2L). (4R) The inverse transformation of (1L).- Contributors:
- Ming Gu and Ren-Cang Li, Computer Science Division, University of California at Berkeley, USAOsni Marques, LBNL/NERSC, USA
Parameters
inicompqSpecifies whether singular vectors are to be computed in factored form:
icompq=0: Left singular vector matrix.icompq=1: Right singular vector matrix.innlThe row dimension of the upper block.
nl>=1.innrThe row dimension of the lower block.
nr>=1.insqresqre=0: the lower block is annr-by-nrsquare matrix.sqre=1: the lower block is annr-by-(nr+1)rectangular matrix. The bidiagonal matrix has row dimensionn = nl+nr+1, and column dimensionm = n+sqre.innrhsThe number of columns of
BandBX.nrhsmust be at least 1.inoutBComplex array of dimension (
ldb,nrhs). On input,Bcontains the right hand sides of the least squares problem in rows0throughm-1. On output,Bcontains the solution X in rows0throughn-1.inldbThe leading dimension of
B.ldbmust be at leastmax(1,max(m,n)).outBXComplex array of dimension (
ldbx,nrhs).inldbxThe leading dimension of
BX.inpermInteger array of dimension (
n). The permutations (from deflation and sorting) applied to the two blocks.ingivptrThe number of Givens rotations which took place in this subproblem.
ingivcolInteger array of dimension (
ldgcol, 2). Each pair of numbers indicates a pair of rows/columns involved in a Givens rotation.inldgcolThe leading dimension of
givcol, must be at leastn.ingivnumReal array of dimension (
ldgnum, 2). Each number indicates the C or S value used in the corresponding Givens rotation.inldgnumThe leading dimension of arrays
difr,polesandgivnum, must be at leastk.inpolesReal array of dimension (
ldgnum, 2). On entry,poles[0:k-1,0]is an array containing the old singular values which will be used to form the secular equation in CLASD4;poles[0:k-1,1]is an array containing the new singular values obtained from solving the secular equation.indiflReal array of dimension (
k). On entry,difl[i]is the distance between i-th updated (undeflated) singular value and the i-th (undeflated) old singular value.indifrReal array of dimension (
ldgnum, 2). On entry,difr[i,0]contains the distances between i-th updated (undeflated) singular value and the (i+1)-th (undeflated) old singular value. Anddifr[i,1]is the normalizing factor for the i-th right singular vector.inZReal array of dimension (
k). Contain the components of the deflation-adjusted updating row vector.inkContains the dimension of the non-deflated matrix, This is the order of the related secular equation.
1<=k<=n.incccontains garbage ifsqre=0and the C-value of a Givens rotation related to the right null space ifsqre=1.insscontains garbage ifsqre=0and the S-value of a Givens rotation related to the right null space ifsqre=1.outrworkReal array of dimension (
k*(1+nrhs) + 2*nrhs).outinfoinfo=0: successful exit.info<0: ifinfo=-i, the i-th argument had an illegal value.
void clals0(
const INT icompq,
const INT nl,
const INT nr,
const INT sqre,
const INT nrhs,
c64* restrict B,
const INT ldb,
c64* restrict BX,
const INT ldbx,
const INT* restrict perm,
const INT givptr,
const INT* restrict givcol,
const INT ldgcol,
const f32* restrict givnum,
const INT ldgnum,
const f32* restrict poles,
const f32* restrict difl,
const f32* restrict difr,
const f32* restrict Z,
const INT k,
const f32 c,
const f32 s,
f32* restrict rwork,
INT* info
);
Functions
-
void zlals0(const INT icompq, const INT nl, const INT nr, const INT sqre, const INT nrhs, c128 *restrict B, const INT ldb, c128 *restrict BX, const INT ldbx, const INT *restrict perm, const INT givptr, const INT *restrict givcol, const INT ldgcol, const f64 *restrict givnum, const INT ldgnum, const f64 *restrict poles, const f64 *restrict difl, const f64 *restrict difr, const f64 *restrict Z, const INT k, const f64 c, const f64 s, f64 *restrict rwork, INT *info)#
ZLALS0 applies back the multiplying factors of either the left or the right singular vector matrix of a diagonal matrix appended by a row to the right hand side matrix B in solving the least squares problem using the divide-and-conquer SVD approach.
For the left singular vector matrix, three types of orthogonal matrices are involved:
For the right singular vector matrix, four types of orthogonal matrices are involved:(1L) Givens rotations: the number of such rotations is GIVPTR; the pairs of columns/rows they were applied to are stored in GIVCOL; and the C- and S-values of these rotations are stored in GIVNUM. (2L) Permutation. The (NL+1)-st row of B is to be moved to the first row, and for J=2:N, PERM(J)-th row of B is to be moved to the J-th row. (3L) The left singular vector matrix of the remaining matrix.(1R) The right singular vector matrix of the remaining matrix. (2R) If SQRE = 1, one extra Givens rotation to generate the right null space. (3R) The inverse transformation of (2L). (4R) The inverse transformation of (1L).- Contributors:
- Ming Gu and Ren-Cang Li, Computer Science Division, University of California at Berkeley, USAOsni Marques, LBNL/NERSC, USA
Parameters
inicompqSpecifies whether singular vectors are to be computed in factored form:
icompq=0: Left singular vector matrix.icompq=1: Right singular vector matrix.innlThe row dimension of the upper block.
nl>=1.innrThe row dimension of the lower block.
nr>=1.insqresqre=0: the lower block is annr-by-nrsquare matrix.sqre=1: the lower block is annr-by-(nr+1)rectangular matrix. The bidiagonal matrix has row dimensionn = nl+nr+1, and column dimensionm = n+sqre.innrhsThe number of columns of
BandBX.nrhsmust be at least 1.inoutBComplex array of dimension (
ldb,nrhs). On input,Bcontains the right hand sides of the least squares problem in rows0throughm-1. On output,Bcontains the solution X in rows0throughn-1.inldbThe leading dimension of
B.ldbmust be at leastmax(1,max(m,n)).outBXComplex array of dimension (
ldbx,nrhs).inldbxThe leading dimension of
BX.inpermInteger array of dimension (
n). The permutations (from deflation and sorting) applied to the two blocks.ingivptrThe number of Givens rotations which took place in this subproblem.
ingivcolInteger array of dimension (
ldgcol, 2). Each pair of numbers indicates a pair of rows/columns involved in a Givens rotation.inldgcolThe leading dimension of
givcol, must be at leastn.ingivnumReal array of dimension (
ldgnum, 2). Each number indicates the C or S value used in the corresponding Givens rotation.inldgnumThe leading dimension of arrays
difr,polesandgivnum, must be at leastk.inpolesReal array of dimension (
ldgnum, 2). On entry,poles[0:k-1,0]is an array containing the old singular values which will be used to form the secular equation in ZLASD4;poles[0:k-1,1]is an array containing the new singular values obtained from solving the secular equation.indiflReal array of dimension (
k). On entry,difl[i]is the distance between i-th updated (undeflated) singular value and the i-th (undeflated) old singular value.indifrReal array of dimension (
ldgnum, 2). On entry,difr[i,0]contains the distances between i-th updated (undeflated) singular value and the (i+1)-th (undeflated) old singular value. Anddifr[i,1]is the normalizing factor for the i-th right singular vector.inZReal array of dimension (
k). Contain the components of the deflation-adjusted updating row vector.inkContains the dimension of the non-deflated matrix, This is the order of the related secular equation.
1<=k<=n.incccontains garbage ifsqre=0and the C-value of a Givens rotation related to the right null space ifsqre=1.insscontains garbage ifsqre=0and the S-value of a Givens rotation related to the right null space ifsqre=1.outrworkReal array of dimension (
k*(1+nrhs) + 2*nrhs).outinfoinfo=0: successful exit.info<0: ifinfo=-i, the i-th argument had an illegal value.
void zlals0(
const INT icompq,
const INT nl,
const INT nr,
const INT sqre,
const INT nrhs,
c128* restrict B,
const INT ldb,
c128* restrict BX,
const INT ldbx,
const INT* restrict perm,
const INT givptr,
const INT* restrict givcol,
const INT ldgcol,
const f64* restrict givnum,
const INT ldgnum,
const f64* restrict poles,
const f64* restrict difl,
const f64* restrict difr,
const f64* restrict Z,
const INT k,
const f64 c,
const f64 s,
f64* restrict rwork,
INT* info
);