?bdsdc
?bdsdc
Computes the singular value decomposition of a real bidiagonal matrix using a divide and conquer method.
Syntax
lapack_int
LAPACKE_sbdsdc
(
int
matrix_layout
,
char
uplo
,
char
compq
,
lapack_int
n
,
float
*
d
,
float
*
e
,
float
*
u
,
lapack_int
ldu
,
float
*
vt
,
lapack_int
ldvt
,
float
*
q
,
lapack_int
*
iq
);
lapack_int
LAPACKE_dbdsdc
(
int
matrix_layout
,
char
uplo
,
char
compq
,
lapack_int
n
,
double
*
d
,
double
*
e
,
double
*
u
,
lapack_int
ldu
,
double
*
vt
,
lapack_int
ldvt
,
double
*
q
,
lapack_int
*
iq
);
Include Files
- mkl.h
Description
The routine computes the Singular Value Decomposition (SVD) of a real , using a divide and conquer method, where
n
-by-n
(upper or lower) bidiagonal matrix B
: B
= U
*Σ
*V
T
Σ
is a diagonal matrix with non-negative diagonal elements (the singular values of B
), and U
and V
are orthogonal matrices of left and right singular vectors, respectively. ?bdsdc
can be used to compute all singular values, and optionally, singular vectors or singular vectors in compact form.This rotuine uses
?lasd0
, ?lasd1
, ?lasd2
, ?lasd3
, ?lasd4
, ?lasd5
, ?lasd6
, ?lasd7
, ?lasd8
, ?lasd9
, ?lasda
, ?lasdq
, ?lasdt
.Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- uplo
- Must be'U'or'L'.If,uplo='U'Bis an upper bidiagonal matrix.If,uplo='L'Bis a lower bidiagonal matrix.
- compq
- Must be'N','P', or'I'.If, compute singular values only.compq='N'If, compute singular values and compute singular vectors in compact form.compq='P'If, compute singular values and singular vectors.compq='I'
- d,e
- Arrays:dcontains thendiagonal elements of the bidiagonal matrixB. The size ofdmust be at least max(1,n).econtains the off-diagonal elements of the bidiagonal matrixB. The size ofemust be at least max(1,n).
- ldu
- The leading dimension of the output arrayu;ldu≥1.If singular vectors are desired, thenldu≥max(1,n), regardless of the value of.matrix_layout
- ldvt
- The leading dimension of the output arrayvt;ldvt≥1.If singular vectors are desired, thenldvt≥max(1,n), regardless of the value of.matrix_layout
Output Parameters
- d
- If, overwritten by the singular values ofinfo= 0B.
- e
- On exit,eis overwritten.
- u,vt,q
- Arrays:u(size,ldu*n)vt(size,ldvt*n)q(size.≥n*(11 + 2*smlsiz+ 8*int(log2(n/(smlsiz+1)))) wheresmlsizis returned byilaenvand is equal to maximum size of the subproblems at the bottom of the computation tree ).If, then on exitcompq='I'ucontains the left singular vectors of the bidiagonal matrixB, unless(info≠0seeinfo). For other values ofcompq,uis not referenced.if, then on exitcompq='I'vtcontains the right singular vectors of the bidiagonal matrixTB, unless(info≠0seeinfo). For other values ofcompq,vtis not referenced.If, then on exit, ifcompq='P',info= 0qandiqcontain the left and right singular vectors in a compact form. Specifically,qcontains all thefloat(forsbdsdc) ordouble(fordbdsdc) data for singular vectors. For other values ofcompq,qis not referenced.
- iq
- Array:iq(size.≥n*(3 + 3*int(log2(n/(smlsiz+1)))) wheresmlsizis returned byilaenvand is equal to maximum size of the subproblems at the bottom of the computation tree.)If, then on exit, ifcompq='P',info= 0qandiqcontain the left and right singular vectors in a compact form. Specifically,iqcontains all thelapack_intdata for singular vectors. For other values ofcompq,iqis not referenced.
Return Values
This function returns a value
info
.If , the execution is successful.
info
=0If , the
info
= -i
i
-th parameter had an illegal value.If , the algorithm failed to compute a singular value. The update process of divide and conquer failed.
info
= i