Contents

# ?lasd2

Merges the two sets of singular values together into a single sorted set. Used by
?bdsdc
.

## Syntax

Include Files
• mkl.h
Description
The routine
?lasd2
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
Z
vector. For each such occurrence the order of the related secular equation problem is reduced by one.
The routine
?lasd2
is called from
?lasd1
.
Input Parameters
nl
The row dimension of the upper block.
nl
1
.
nr
The row dimension of the lower block.
nr
1
.
sqre
If
sqre
= 0
): the lower block is an
nr
-by-
nr
square matrix
If
sqre
= 1
): the lower block is an
nr
-by-(
nr
+1) rectangular matrix. The bidiagonal matrix has
n
=
nl
+
nr
+ 1
rows and
m
=
n
+
sqre
n
columns.
d
Array,
DIMENSION
(
n
). On entry
d
contains the singular values of the two submatrices to be combined.
alpha
Contains the diagonal element associated with the added row.
beta
Contains the off-diagonal element associated with the added row.
u
Array,
DIMENSION
(
ldu
,
n
). On entry
u
contains the left singular vectors of two submatrices in the two square blocks with corners at (1,1), (
nl
,
nl
), and (
nl
+2,
nl
+2), (
n
,
n
).
ldu
The leading dimension of the array
u
.
ldu
n
.
ldu2
The leading dimension of the output array
u2
.
ldu2
n
.
vt
Array,
DIMENSION
(
ldvt
,
m
). On entry,
vt
T
contains the right singular vectors of two submatrices in the two square blocks with corners at (1,1), (
nl
+1,
nl
+1), and (
nl
+2,
nl
+2), (
m
,
m
).
ldvt
The leading dimension of the array
vt
.
ldvt
m
.
ldvt2
The leading dimension of the output array
vt2
.
ldvt2
m
.
idxp
Workspace array,
DIMENSION
(
n
). This will contain the permutation used to place deflated values of
D
at the end of the array. On output
idxp
(2:
k
) points to the nondeflated
d
-values and
idxp
(
k
+1:
n
) points to the deflated singular values.
idx
Workspace array,
DIMENSION
(
n
). This will contain the permutation used to sort the contents of
d
into ascending order.
coltyp
Workspace array,
DIMENSION
(
n
). As workspace, this array contains a label that indicates which of the following types a column in the
u2
matrix or a row in the
vt2
matrix is:
1 : non-zero in the upper half only
2 : non-zero in the lower half only
3 : dense
4 : deflated.
idxq
Array,
DIMENSION
(
n
). This parameter contains the permutation that separately sorts the two sub-problems in
D
in the ascending order. Note that entries in the first half of this permutation must first be moved one position backwards and entries in the second half must have
nl
+1
Output Parameters
k
Contains the dimension of the non-deflated matrix, This is the order of the related secular equation.
1 ≤
k
n
.
d
On exit
D
contains the trailing (
n
-
k
) updated singular values (those which were deflated) sorted into increasing order.
u
On exit
u
contains the trailing (
n
-
k
) updated left singular vectors (those which were deflated) in its last
n
-
k
columns.
z
Array,
DIMENSION
(
n
). On exit,
z
contains the updating row vector in the secular equation.
dsigma
Array,
DIMENSION
(
n
). Contains a copy of the diagonal elements (
k
-1
singular values and one zero) in the secular equation.
u2
Array,
DIMENSION
(
ldu2
,
n
). Contains a copy of the first
k
-1
left singular vectors which will be used by
?lasd3
in a matrix multiply (
?gemm
) to solve for the new left singular vectors.
u2
is arranged into four blocks. The first block contains a column with 1 at
nl
+1
and zero everywhere else; the second block contains non-zero entries only at and above
nl
; the third contains non-zero entries only below
nl
+1
; and the fourth is dense.
vt
On exit,
vt
T
contains the trailing (
n
-
k
) updated right singular vectors (those which were deflated) in its last
n
-
k
columns. In case
sqre
=1
, the last row of
vt
spans the right null space.
vt2
Array,
DIMENSION
(
ldvt2
,
n
).
vt2
T
contains a copy of the first
k
right singular vectors which will be used by
?lasd3
in a matrix multiply (
?gemm
) to solve for the new right singular vectors.
vt2
is arranged into three blocks. The first block contains a row that corresponds to the special 0 diagonal element in
sigma
; the second block contains non-zeros only at and before
nl
+1
; the third block contains non-zeros only at and after
nl
+2
.
idxc
Array,
DIMENSION
(
n
). This will contain the permutation used to arrange the columns of the deflated
u
matrix into three groups: the first group contains non-zero entries only at and above
nl
, the second contains non-zero entries only below
nl
+2
, and the third is dense.
coltyp
On exit, it is an array of dimension 4, with
coltyp
(
i
) being the dimension of the
i
-th type columns.
info
If
info
= 0
): successful exit
If
info
= -
i
< 0
, the
i
-th argument had an illegal value.

#### Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804