lasd7#
Functions
-
void slasd7(const INT icompq, const INT nl, const INT nr, const INT sqre, INT *k, f32 *restrict D, f32 *restrict Z, f32 *restrict ZW, f32 *restrict VF, f32 *restrict VFW, f32 *restrict VL, f32 *restrict VLW, const f32 alpha, const f32 beta, f32 *restrict DSIGMA, INT *restrict IDX, INT *restrict IDXP, INT *restrict IDXQ, INT *restrict PERM, INT *givptr, INT *restrict GIVCOL, const INT ldgcol, f32 *restrict GIVNUM, const INT ldgnum, f32 *c, f32 *s, INT *info)#
SLASD7 merges the two sets of singular values together into a single sorted set.
Then it tries to deflate the size of the problem. There are two ways in which deflation can occur: when two or more singular values are close together or if there is a tiny entry in the
Zvector. For each such occurrence the order of the related secular equation problem is reduced by one.SLASD7 is called from SLASD6.
- Contributors:
Ming Gu and Huan Ren, Computer Science Division, University of California at Berkeley, USA
Parameters
inicompqSpecifies whether singular vectors are to be computed in compact form, as follows:
icompq=0: Compute singular values only.icompq=1: Compute singular vectors of upper bidiagonal matrix in compact form.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 hasn = nl+nr+1rows andm = n+sqre >= ncolumns.outkContains the dimension of the non-deflated matrix, this is the order of the related secular equation.
1<=k<=n.inoutDArray of dimension (
n). On entryDcontains the singular values of the two submatrices to be combined. On exitDcontains the trailing (n-k) updated singular values (those which were deflated) sorted into decreasing order.outZArray of dimension (
m). On exitZcontains the updating row vector in the secular equation.outZWArray of dimension (
m). Workspace forZ.inoutVFArray of dimension (
m). On entry,VF[0:nl]contains the first components of all right singular vectors of the upper block; andVF[nl+1:m-1]contains the first components of all right singular vectors of the lower block. On exit,VFcontains the first components of all right singular vectors of the bidiagonal matrix.outVFWArray of dimension (
m). Workspace forVF.inoutVLArray of dimension (
m). On entry,VL[0:nl]contains the last components of all right singular vectors of the upper block; andVL[nl+1:m-1]contains the last components of all right singular vectors of the lower block. On exit,VLcontains the last components of all right singular vectors of the bidiagonal matrix.outVLWArray of dimension (
m). Workspace forVL.inalphaContains the diagonal element associated with the added row.
inbetaContains the off-diagonal element associated with the added row.
outDSIGMAArray of dimension (
n). Contains a copy of the diagonal elements (k-1singular values and one zero) in the secular equation.outIDXInteger array of dimension (
n). This will contain the permutation used to sort the contents ofDinto ascending order.outIDXPInteger array of dimension (
n). This will contain the permutation used to place deflated values ofDat the end of the array. On outputIDXP[1:k-1]points to the nondeflated D-values andIDXP[k:n-1]points to the deflated singular values.inIDXQInteger array of dimension (
n). This contains the permutation which separately sorts the two sub-problems inDinto ascending order. Note that entries in the first half of this permutation must first be moved one position backward; and entries in the second half must first havenl+1added to their values.outPERMInteger array of dimension (
n). The permutations (from deflation and sorting) to be applied to each singular block. Not referenced ificompq=0.outgivptrThe number of Givens rotations which took place in this subproblem. Not referenced if
icompq=0.outGIVCOLInteger array of dimension (
ldgcol, 2). Each pair of numbers indicates a pair of columns to take place in a Givens rotation. Not referenced ificompq=0.inldgcolThe leading dimension of
GIVCOL, must be at leastn.outGIVNUMArray of dimension (
ldgnum, 2). Each number indicates the C or S value to be used in the corresponding Givens rotation. Not referenced ificompq=0.inldgnumThe leading dimension of
GIVNUM, must be at leastn.outcccontains garbage ifsqre=0and the C-value of a Givens rotation related to the right null space ifsqre=1.outsscontains garbage ifsqre=0and the S-value of a Givens rotation related to the right null space ifsqre=1.outinfoinfo=0: successful exit.info<0: ifinfo=-i, the i-th argument had an illegal value.
void slasd7(
const INT icompq,
const INT nl,
const INT nr,
const INT sqre,
INT* k,
f32* restrict D,
f32* restrict Z,
f32* restrict ZW,
f32* restrict VF,
f32* restrict VFW,
f32* restrict VL,
f32* restrict VLW,
const f32 alpha,
const f32 beta,
f32* restrict DSIGMA,
INT* restrict IDX,
INT* restrict IDXP,
INT* restrict IDXQ,
INT* restrict PERM,
INT* givptr,
INT* restrict GIVCOL,
const INT ldgcol,
f32* restrict GIVNUM,
const INT ldgnum,
f32* c,
f32* s,
INT* info
);
Functions
-
void dlasd7(const INT icompq, const INT nl, const INT nr, const INT sqre, INT *k, f64 *restrict D, f64 *restrict Z, f64 *restrict ZW, f64 *restrict VF, f64 *restrict VFW, f64 *restrict VL, f64 *restrict VLW, const f64 alpha, const f64 beta, f64 *restrict DSIGMA, INT *restrict IDX, INT *restrict IDXP, INT *restrict IDXQ, INT *restrict PERM, INT *givptr, INT *restrict GIVCOL, const INT ldgcol, f64 *restrict GIVNUM, const INT ldgnum, f64 *c, f64 *s, INT *info)#
DLASD7 merges the two sets of singular values together into a single sorted set.
Then it tries to deflate the size of the problem. There are two ways in which deflation can occur: when two or more singular values are close together or if there is a tiny entry in the
Zvector. For each such occurrence the order of the related secular equation problem is reduced by one.DLASD7 is called from DLASD6.
- Contributors:
Ming Gu and Huan Ren, Computer Science Division, University of California at Berkeley, USA
Parameters
inicompqSpecifies whether singular vectors are to be computed in compact form, as follows:
icompq=0: Compute singular values only.icompq=1: Compute singular vectors of upper bidiagonal matrix in compact form.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 hasn = nl+nr+1rows andm = n+sqre >= ncolumns.outkContains the dimension of the non-deflated matrix, this is the order of the related secular equation.
1<=k<=n.inoutDArray of dimension (
n). On entryDcontains the singular values of the two submatrices to be combined. On exitDcontains the trailing (n-k) updated singular values (those which were deflated) sorted into decreasing order.outZArray of dimension (
m). On exitZcontains the updating row vector in the secular equation.outZWArray of dimension (
m). Workspace forZ.inoutVFArray of dimension (
m). On entry,VF[0:nl]contains the first components of all right singular vectors of the upper block; andVF[nl+1:m-1]contains the first components of all right singular vectors of the lower block. On exit,VFcontains the first components of all right singular vectors of the bidiagonal matrix.outVFWArray of dimension (
m). Workspace forVF.inoutVLArray of dimension (
m). On entry,VL[0:nl]contains the last components of all right singular vectors of the upper block; andVL[nl+1:m-1]contains the last components of all right singular vectors of the lower block. On exit,VLcontains the last components of all right singular vectors of the bidiagonal matrix.outVLWArray of dimension (
m). Workspace forVL.inalphaContains the diagonal element associated with the added row.
inbetaContains the off-diagonal element associated with the added row.
outDSIGMAArray of dimension (
n). Contains a copy of the diagonal elements (k-1singular values and one zero) in the secular equation.outIDXInteger array of dimension (
n). This will contain the permutation used to sort the contents ofDinto ascending order.outIDXPInteger array of dimension (
n). This will contain the permutation used to place deflated values ofDat the end of the array. On outputIDXP[1:k-1]points to the nondeflated D-values andIDXP[k:n-1]points to the deflated singular values.inIDXQInteger array of dimension (
n). This contains the permutation which separately sorts the two sub-problems inDinto ascending order. Note that entries in the first half of this permutation must first be moved one position backward; and entries in the second half must first havenl+1added to their values.outPERMInteger array of dimension (
n). The permutations (from deflation and sorting) to be applied to each singular block. Not referenced ificompq=0.outgivptrThe number of Givens rotations which took place in this subproblem. Not referenced if
icompq=0.outGIVCOLInteger array of dimension (
ldgcol, 2). Each pair of numbers indicates a pair of columns to take place in a Givens rotation. Not referenced ificompq=0.inldgcolThe leading dimension of
GIVCOL, must be at leastn.outGIVNUMArray of dimension (
ldgnum, 2). Each number indicates the C or S value to be used in the corresponding Givens rotation. Not referenced ificompq=0.inldgnumThe leading dimension of
GIVNUM, must be at leastn.outcccontains garbage ifsqre=0and the C-value of a Givens rotation related to the right null space ifsqre=1.outsscontains garbage ifsqre=0and the S-value of a Givens rotation related to the right null space ifsqre=1.outinfoinfo=0: successful exit.info<0: ifinfo=-i, the i-th argument had an illegal value.
void dlasd7(
const INT icompq,
const INT nl,
const INT nr,
const INT sqre,
INT* k,
f64* restrict D,
f64* restrict Z,
f64* restrict ZW,
f64* restrict VF,
f64* restrict VFW,
f64* restrict VL,
f64* restrict VLW,
const f64 alpha,
const f64 beta,
f64* restrict DSIGMA,
INT* restrict IDX,
INT* restrict IDXP,
INT* restrict IDXQ,
INT* restrict PERM,
INT* givptr,
INT* restrict GIVCOL,
const INT ldgcol,
f64* restrict GIVNUM,
const INT ldgnum,
f64* c,
f64* s,
INT* info
);