syevd#

Functions

void ssyevd(
    const char*          jobz,
    const char*          uplo,
    const INT            n,
          f32*  restrict A,
    const INT            lda,
          f32*  restrict W,
          f32*  restrict work,
    const INT            lwork,
          INT*  restrict iwork,
    const INT            liwork,
          INT*           info
);
void ssyevd(const char *jobz, const char *uplo, const INT n, f32 *restrict A, const INT lda, f32 *restrict W, f32 *restrict work, const INT lwork, INT *restrict iwork, const INT liwork, INT *info)#

SSYEVD computes all eigenvalues and, optionally, eigenvectors of a real symmetric matrix A.

If eigenvectors are desired, it uses a divide and conquer algorithm.

Because of large use of BLAS of level 3, SSYEVD needs N**2 more workspace than SSYEVX.

Parameters

in
jobz

= ‘N’: Compute eigenvalues only; = ‘V’: Compute eigenvalues and eigenvectors.

in
uplo

= ‘U’: Upper triangle of A is stored; = ‘L’: Lower triangle of A is stored.

in
n

The order of the matrix A. n >= 0.

inout
A

On entry, the symmetric matrix A. On exit, if JOBZ = ‘V’, then A contains the orthonormal eigenvectors of the matrix A. If JOBZ = ‘N’, then the triangle is destroyed.

in
lda

The leading dimension of A. lda >= max(1, n).

out
W

Array of dimension (n). The eigenvalues in ascending order.

out
work

Workspace array, dimension (max(1, lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

The dimension of work. If N <= 1, LWORK >= 1. If JOBZ = ‘N’ and N > 1, LWORK >= 2*N+1. If JOBZ = ‘V’ and N > 1, LWORK >= 1 + 6*N + 2*N**2. If lwork = -1, workspace query only.

out
iwork

Integer workspace array, dimension (max(1, liwork)). On exit, if info = 0, iwork[0] returns the optimal liwork.

in
liwork

The dimension of iwork. If N <= 1, LIWORK >= 1. If JOBZ = ‘N’ and N > 1, LIWORK >= 1. If JOBZ = ‘V’ and N > 1, LIWORK >= 3 + 5*N. If liwork = -1, workspace query only.

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value

  • > 0: if info = i and JOBZ = ‘N’, the algorithm failed to converge; i off-diagonal elements did not converge to zero; if info = i and JOBZ = ‘V’, the algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columns INFO/(N+1) through mod(INFO,N+1).

Functions

void dsyevd(
    const char*          jobz,
    const char*          uplo,
    const INT            n,
          f64*  restrict A,
    const INT            lda,
          f64*  restrict W,
          f64*  restrict work,
    const INT            lwork,
          INT*  restrict iwork,
    const INT            liwork,
          INT*           info
);
void dsyevd(const char *jobz, const char *uplo, const INT n, f64 *restrict A, const INT lda, f64 *restrict W, f64 *restrict work, const INT lwork, INT *restrict iwork, const INT liwork, INT *info)#

DSYEVD computes all eigenvalues and, optionally, eigenvectors of a real symmetric matrix A.

If eigenvectors are desired, it uses a divide and conquer algorithm.

Because of large use of BLAS of level 3, DSYEVD needs N**2 more workspace than DSYEVX.

Parameters

in
jobz

= ‘N’: Compute eigenvalues only; = ‘V’: Compute eigenvalues and eigenvectors.

in
uplo

= ‘U’: Upper triangle of A is stored; = ‘L’: Lower triangle of A is stored.

in
n

The order of the matrix A. n >= 0.

inout
A

On entry, the symmetric matrix A. On exit, if JOBZ = ‘V’, then A contains the orthonormal eigenvectors of the matrix A. If JOBZ = ‘N’, then the triangle is destroyed.

in
lda

The leading dimension of A. lda >= max(1, n).

out
W

Array of dimension (n). The eigenvalues in ascending order.

out
work

Workspace array, dimension (max(1, lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

The dimension of work. If N <= 1, LWORK >= 1. If JOBZ = ‘N’ and N > 1, LWORK >= 2*N+1. If JOBZ = ‘V’ and N > 1, LWORK >= 1 + 6*N + 2*N**2. If lwork = -1, workspace query only.

out
iwork

Integer workspace array, dimension (max(1, liwork)). On exit, if info = 0, iwork[0] returns the optimal liwork.

in
liwork

The dimension of iwork. If N <= 1, LIWORK >= 1. If JOBZ = ‘N’ and N > 1, LIWORK >= 1. If JOBZ = ‘V’ and N > 1, LIWORK >= 3 + 5*N. If liwork = -1, workspace query only.

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value

  • > 0: if info = i and JOBZ = ‘N’, the algorithm failed to converge; i off-diagonal elements did not converge to zero; if info = i and JOBZ = ‘V’, the algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columns INFO/(N+1) through mod(INFO,N+1).