Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 7/13/2023
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

call sbdsdc(uplo, compq, n, d, e, u, ldu, vt, ldvt, q, iq, work, iwork, info)

call dbdsdc(uplo, compq, n, d, e, u, ldu, vt, ldvt, q, iq, work, iwork, info)

call bdsdc(d, e [,u] [,vt] [,q] [,iq] [,uplo] [,info])

Include Files

  • mkl.fi, lapack.f90

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

uplo

CHARACTER*1. Must be 'U' or 'L'.

If uplo = 'U', B is an upper bidiagonal matrix.

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

compq

CHARACTER*1. 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

INTEGER. The order of the matrix B (n 0).

d, e, work

REAL for sbdsdc

DOUBLE PRECISION for dbdsdc.

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).

work(*) is a workspace array.

The dimension of work must be at least:

max(1, 4*n), if compq = 'N' or compq = 'P';

max(1, 3*n2+4*n), if compq = 'I'.

ldu

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

If singular vectors are desired, then ldu max(1, n).

ldvt

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

If singular vectors are desired, then ldvt max(1, n).

iwork

INTEGER. Workspace array, dimension at least max(1, 8*n).

Output Parameters

d

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

e

On exit, e is overwritten.

u, vt, q

REAL for sbdsdc

DOUBLE PRECISION for dbdsdc.

Arrays: u(ldu,*), vt(ldvt,*), q(*).

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.

The second dimension of u must be at least max(1,n).

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. The second dimension of vt must be at least max(1,n).

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 REAL (for sbdsdc) or DOUBLE PRECISION (for dbdsdc) data for singular vectors. For other values of compq, q is not referenced.

iq

INTEGER.

Array: iq(*).

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 INTEGER data for singular vectors. For other values of compq, iq is not referenced.

info

INTEGER.

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.

LAPACK 95 Interface Notes

Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or restorable arguments, see LAPACK 95 Interface Conventions.

Specific details for the routine bdsdc interface are the following:

d

Holds the vector of length n.

e

Holds the vector of length n.

u

Holds the matrix U of size (n,n).

vt

Holds the matrix VT of size (n,n).

q

Holds the vector of length (ldq), where

ldq n*(11 + 2*smlsiz + 8*int(log_2(n/(smlsiz + 1)))) and smlsiz is returned by ilaenv and is equal to the maximum size of the subproblems at the bottom of the computation tree (usually about 25).

compq

Restored based on the presence of arguments u, vt, q, and iq as follows:

compq = 'N', if none of u, vt, q, and iq are present,

compq = 'I', if both u and vt are present. Arguments u and vt must either be both present or both omitted,

compq = 'P', if both q and iq are present. Arguments q and iq must either be both present or both omitted.

Note that there will be an error condition if all of u, vt, q, and iq arguments are present simultaneously.