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

?lasd1

Computes the SVD of an upper bidiagonal matrix B of the specified size. Used by ?bdsdc.

Syntax

void slasd1( lapack_int *nl, lapack_int *nr, lapack_int *sqre, float *d, float *alpha, float *beta, float *u, lapack_int *ldu, float *vt, lapack_int *ldvt, lapack_int *idxq, lapack_int *iwork, float *work, lapack_int *info );

void dlasd1( lapack_int *nl, lapack_int *nr, lapack_int *sqre, double *d, double *alpha, double *beta, double *u, lapack_int *ldu, double *vt, lapack_int *ldvt, lapack_int *idxq, lapack_int *iwork, double *work, lapack_int *info );

Include Files

  • mkl.h

Description

The routine computes the SVD of an upper bidiagonal n-by-m matrix B, where n = nl + nr + 1 and m = n + sqre.

The routine ?lasd1 is called from ?lasd0.

A related subroutine ?lasd7 handles the case in which the singular values (and the singular vectors in factored form) are desired.

?lasd1 computes the SVD as follows:


Equation

= U(out)*(D(out) 0)*VT(out)

whereZT = (Z1TaZ2Tb) = uT*VTT, and u is a vector of dimension m with alpha and beta in the nl+1 and nl+2-th entries and zeros elsewhere; and the entry b is empty if sqre = 0.

The left singular vectors of the original matrix are stored in u, and the transpose of the right singular vectors are stored in vt, and the singular values are in d. The algorithm consists of three stages:

  1. The first stage consists of deflating the size of the problem when there are multiple singular values or when there are zeros in the Z vector. For each such occurrence the dimension of the secular equation problem is reduced by one. This stage is performed by the routine ?lasd2.

  2. The second stage consists of calculating the updated singular values. This is done by finding the square roots of the roots of the secular equation via the routine ?lasd4 (as called by ?lasd3). This routine also calculates the singular vectors of the current problem.

  3. The final stage consists of computing the updated singular vectors directly using the updated singular values. The singular vectors for the current problem are multiplied with the singular vectors from the overall problem.

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 row dimension n = nl + nr + 1, and column dimension m = n + sqre.

d

Array, DIMENSION (nl+nr+1). n = nl+nr+1. On entry d(1:nl,1:nl) contains the singular values of the upper block; and d(nl+2:n) contains the singular values of the lower block.

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(1:nl, 1:nl) contains the left singular vectors of the upper block; u(nl+2:n, nl+2:n) contains the left singular vectors of the lower block.

ldu

The leading dimension of the array U.

ldu max(1, n).

vt

Array, DIMENSION (ldvt, m), where m = n + sqre.

On entry vt(1:nl+1, 1:nl+1)T contains the right singular vectors of the upper block; vt(nl+2:m, nl+2:m)T contains the right singular vectors of the lower block.

ldvt

The leading dimension of the array vt.

ldvt max(1, M).

iwork

Workspace array, DIMENSION (4n).

work

Workspace array, DIMENSION (3m2 + 2m).

Output Parameters

d

On exit d(1:n) contains the singular values of the modified matrix.

alpha

On exit, the diagonal element associated with the added row deflated by max( abs( alpha ), abs( beta ), abs( D(I) ) ), I = 1,n.

beta

On exit, the off-diagonal element associated with the added row deflated by max( abs( alpha ), abs( beta ), abs( D(I) ) ), I = 1,n.

u

On exit u contains the left singular vectors of the bidiagonal matrix.

vt

On exit vtT contains the right singular vectors of the bidiagonal matrix.

idxq

Array, DIMENSION (n). Contains the permutation which will reintegrate the subproblem just solved back into sorted order, that is, d(idxq( i = 1, n )) will be in ascending order.

info

If info = 0: successful exit.

If info = -i < 0, the i-th argument had an illegal value.

If info = 1, a singular value did not converge.