Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

?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 n-by-n (upper or lower) bidiagonal matrix B: B = U*Σ*VT, using a divide and conquer method, where Σ 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', B is an upper bidiagonal matrix.

If uplo = 'L', B is a lower bidiagonal matrix.

compq

Must be 'N', 'P', or 'I'.

If compq = 'N', compute singular values only.

If compq = 'P', compute singular values and compute singular vectors in compact form.

If compq = 'I', compute singular values and singular vectors.

n

The order of the matrix B (n 0).

d, e

Arrays:

d contains the n diagonal elements of the bidiagonal matrix B. The size of d must be at least max(1, n).

e contains the off-diagonal elements of the bidiagonal matrix B. The size of e must be at least max(1, n).

ldu

The leading dimension of the output array u; ldu 1.

If singular vectors are desired, then ldu max(1, n), regardless of the value of matrix_layout.

ldvt

The leading dimension of the output array vt; ldvt 1.

If singular vectors are desired, then ldvt max(1, n), regardless of the value of matrix_layout.

Output Parameters

d

If info = 0, overwritten by the singular values of B.

e

On exit, e is 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)))) where smlsiz is returned by ilaenv and is equal to maximum size of the subproblems at the bottom of the computation tree )..

If compq = 'I', then on exit u contains the left singular vectors of the bidiagonal matrix B, unless info 0 (seeinfo). For other values of compq, u is not referenced.

if compq = 'I', then on exit vtT contains the right singular vectors of the bidiagonal matrix B, unless info 0 (seeinfo). For other values of compq, vt is not referenced.

If compq = 'P', then on exit, if info = 0, q and iq contain the left and right singular vectors in a compact form. Specifically, q contains all the float (for sbdsdc) or double (for dbdsdc) data for singular vectors. For other values of compq, q is not referenced.

iq

Array: iq(size n*(3 + 3*int(log2(n/(smlsiz+1)))) where smlsiz is returned by ilaenv and is equal to maximum size of the subproblems at the bottom of the computation tree.).

If compq = 'P', then on exit, if info = 0, q and iq contain the left and right singular vectors in a compact form. Specifically, iq contains all the lapack_int data for singular vectors. For other values of compq, iq is not referenced.

Return Values

This function returns a value info.

If info=0, the execution is successful.

If info = -i, the i-th parameter had an illegal value.

If info = i, the algorithm failed to compute a singular value. The update process of divide and conquer failed.