gesdd#

Functions

void sgesdd(
    const char*          jobz,
    const INT            m,
    const INT            n,
          f32*  restrict A,
    const INT            lda,
          f32*  restrict S,
          f32*  restrict U,
    const INT            ldu,
          f32*  restrict VT,
    const INT            ldvt,
          f32*  restrict work,
    const INT            lwork,
          INT*  restrict IWORK,
          INT*           info
);
void sgesdd(const char *jobz, const INT m, const INT n, f32 *restrict A, const INT lda, f32 *restrict S, f32 *restrict U, const INT ldu, f32 *restrict VT, const INT ldvt, f32 *restrict work, const INT lwork, INT *restrict IWORK, INT *info)#

SGESDD computes the singular value decomposition (SVD) of a real M-by-N matrix A, optionally computing the left and right singular vectors.

If singular vectors are desired, it uses a divide-and-conquer algorithm.

The SVD is written

 A = U * SIGMA * transpose(V)
where SIGMA is an M-by-N matrix which is zero except for its min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.

Note that the routine returns VT = V**T, not V.

Parameters

in
jobz

= ‘A’: all M columns of U and all N rows of V**T returned. = ‘S’: first min(M,N) columns of U and rows of V**T returned. = ‘O’: If M >= N, first N columns of U overwritten on A and all rows of V**T returned in VT; otherwise all columns of U returned in U and first M rows of V**T overwritten on A. = ‘N’: no columns of U or rows of V**T computed.

in
m

Number of rows of A. m >= 0.

in
n

Number of columns of A. n >= 0.

inout
A

Array (lda, n). On entry, M-by-N matrix A. On exit, contents depend on jobz.

in
lda

Leading dimension of A. lda >= max(1, m).

out
S

Array of dimension min(m,n). Singular values in descending order.

out
U

Array (ldu, ucol). Left singular vectors if requested.

in
ldu

Leading dimension of U.

out
VT

Array (ldvt, n). Right singular vectors transposed if requested.

in
ldvt

Leading dimension of VT.

out
work

Array of dimension max(1, lwork).

in
lwork

Dimension of work. If lwork=-1, workspace query.

out
IWORK

Integer array of dimension 8*min(m,n).

out
info

  • = 0: success. < 0: illegal argument. > 0: DC did not converge.

Functions

void dgesdd(
    const char*          jobz,
    const INT            m,
    const INT            n,
          f64*  restrict A,
    const INT            lda,
          f64*  restrict S,
          f64*  restrict U,
    const INT            ldu,
          f64*  restrict VT,
    const INT            ldvt,
          f64*  restrict work,
    const INT            lwork,
          INT*  restrict IWORK,
          INT*           info
);
void dgesdd(const char *jobz, const INT m, const INT n, f64 *restrict A, const INT lda, f64 *restrict S, f64 *restrict U, const INT ldu, f64 *restrict VT, const INT ldvt, f64 *restrict work, const INT lwork, INT *restrict IWORK, INT *info)#

DGESDD computes the singular value decomposition (SVD) of a real M-by-N matrix A, optionally computing the left and right singular vectors.

If singular vectors are desired, it uses a divide-and-conquer algorithm.

The SVD is written

 A = U * SIGMA * transpose(V)
where SIGMA is an M-by-N matrix which is zero except for its min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.

Note that the routine returns VT = V**T, not V.

Parameters

in
jobz

= ‘A’: all M columns of U and all N rows of V**T returned. = ‘S’: first min(M,N) columns of U and rows of V**T returned. = ‘O’: If M >= N, first N columns of U overwritten on A and all rows of V**T returned in VT; otherwise all columns of U returned in U and first M rows of V**T overwritten on A. = ‘N’: no columns of U or rows of V**T computed.

in
m

Number of rows of A. m >= 0.

in
n

Number of columns of A. n >= 0.

inout
A

Array (lda, n). On entry, M-by-N matrix A. On exit, contents depend on jobz.

in
lda

Leading dimension of A. lda >= max(1, m).

out
S

Array of dimension min(m,n). Singular values in descending order.

out
U

Array (ldu, ucol). Left singular vectors if requested.

in
ldu

Leading dimension of U.

out
VT

Array (ldvt, n). Right singular vectors transposed if requested.

in
ldvt

Leading dimension of VT.

out
work

Array of dimension max(1, lwork).

in
lwork

Dimension of work. If lwork=-1, workspace query.

out
IWORK

Integer array of dimension 8*min(m,n).

out
info

  • = 0: success. < 0: illegal argument. > 0: DC did not converge.

Functions

void cgesdd(
    const char*          jobz,
    const INT            m,
    const INT            n,
          c64*  restrict A,
    const INT            lda,
          f32*  restrict S,
          c64*  restrict U,
    const INT            ldu,
          c64*  restrict VT,
    const INT            ldvt,
          c64*  restrict work,
    const INT            lwork,
          f32*  restrict rwork,
          INT*  restrict iwork,
          INT*           info
);
void cgesdd(const char *jobz, const INT m, const INT n, c64 *restrict A, const INT lda, f32 *restrict S, c64 *restrict U, const INT ldu, c64 *restrict VT, const INT ldvt, c64 *restrict work, const INT lwork, f32 *restrict rwork, INT *restrict iwork, INT *info)#

CGESDD computes the singular value decomposition (SVD) of a complex M-by-N matrix A, optionally computing the left and/or right singular vectors, by using divide-and-conquer method.

The SVD is written

 A = U * SIGMA * conjugate-transpose(V)
where SIGMA is an M-by-N matrix which is zero except for its min(m,n) diagonal elements, U is an M-by-M unitary matrix, and V is an N-by-N unitary matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.

Note that the routine returns VT = V**H, not V.

Parameters

in
jobz

= ‘A’: all M columns of U and all N rows of V**H returned. = ‘S’: first min(M,N) columns of U and rows of V**H returned. = ‘O’: If M >= N, first N columns of U overwritten on A and all rows of V**H returned; otherwise all columns of U returned and first M rows of V**H overwritten on A. = ‘N’: no columns of U or rows of V**H computed.

in
m

Number of rows of A. m >= 0.

in
n

Number of columns of A. n >= 0.

inout
A

Complex array (lda, n). On entry, M-by-N matrix A. On exit, contents depend on jobz.

in
lda

Leading dimension of A. lda >= max(1, m).

out
S

Real array of dimension min(m,n). Singular values in descending order.

out
U

Complex array (ldu, ucol). Left singular vectors if requested.

in
ldu

Leading dimension of U.

out
VT

Complex array (ldvt, n). Right singular vectors conjugate-transposed.

in
ldvt

Leading dimension of VT.

out
work

Complex array of dimension max(1, lwork).

in
lwork

Dimension of work. If lwork=-1, workspace query.

out
rwork

Real array.

out
iwork

Integer array of dimension 8*min(m,n).

out
info

= 0: success. < 0: illegal argument. > 0: DC did not converge.

Functions

void zgesdd(
    const char*          jobz,
    const INT            m,
    const INT            n,
          c128* restrict A,
    const INT            lda,
          f64*  restrict S,
          c128* restrict U,
    const INT            ldu,
          c128* restrict VT,
    const INT            ldvt,
          c128* restrict work,
    const INT            lwork,
          f64*  restrict rwork,
          INT*  restrict iwork,
          INT*           info
);
void zgesdd(const char *jobz, const INT m, const INT n, c128 *restrict A, const INT lda, f64 *restrict S, c128 *restrict U, const INT ldu, c128 *restrict VT, const INT ldvt, c128 *restrict work, const INT lwork, f64 *restrict rwork, INT *restrict iwork, INT *info)#

ZGESDD computes the singular value decomposition (SVD) of a complex M-by-N matrix A, optionally computing the left and/or right singular vectors, by using divide-and-conquer method.

The SVD is written

 A = U * SIGMA * conjugate-transpose(V)
where SIGMA is an M-by-N matrix which is zero except for its min(m,n) diagonal elements, U is an M-by-M unitary matrix, and V is an N-by-N unitary matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.

Note that the routine returns VT = V**H, not V.

Parameters

in
jobz

= ‘A’: all M columns of U and all N rows of V**H returned. = ‘S’: first min(M,N) columns of U and rows of V**H returned. = ‘O’: If M >= N, first N columns of U overwritten on A and all rows of V**H returned; otherwise all columns of U returned and first M rows of V**H overwritten on A. = ‘N’: no columns of U or rows of V**H computed.

in
m

Number of rows of A. m >= 0.

in
n

Number of columns of A. n >= 0.

inout
A

Complex array (lda, n). On entry, M-by-N matrix A. On exit, contents depend on jobz.

in
lda

Leading dimension of A. lda >= max(1, m).

out
S

Real array of dimension min(m,n). Singular values in descending order.

out
U

Complex array (ldu, ucol). Left singular vectors if requested.

in
ldu

Leading dimension of U.

out
VT

Complex array (ldvt, n). Right singular vectors conjugate-transposed.

in
ldvt

Leading dimension of VT.

out
work

Complex array of dimension max(1, lwork).

in
lwork

Dimension of work. If lwork=-1, workspace query.

out
rwork

Real array.

out
iwork

Integer array of dimension 8*min(m,n).

out
info

= 0: success. < 0: illegal argument. > 0: DC did not converge.