spevd#

Functions

void sspevd(
    const char*          jobz,
    const char*          uplo,
    const INT            n,
          f32*  restrict AP,
          f32*  restrict W,
          f32*  restrict Z,
    const INT            ldz,
          f32*  restrict work,
    const INT            lwork,
          INT*  restrict iwork,
    const INT            liwork,
          INT*           info
);
void sspevd(const char *jobz, const char *uplo, const INT n, f32 *restrict AP, f32 *restrict W, f32 *restrict Z, const INT ldz, f32 *restrict work, const INT lwork, INT *restrict iwork, const INT liwork, INT *info)#

SSPEVD computes all the eigenvalues and, optionally, eigenvectors of a real symmetric matrix A in packed storage.

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

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
AP

Double precision array, dimension (n*(n+1)/2). On entry, the upper or lower triangle of the symmetric matrix A, packed columnwise. On exit, AP is overwritten by values generated during the reduction to tridiagonal form.

out
W

Double precision array, dimension (n). If info = 0, the eigenvalues in ascending order.

out
Z

Double precision array, dimension (ldz, n). If jobz = ‘V’, then if info = 0, Z contains the orthonormal eigenvectors of the matrix A. If jobz = ‘N’, then Z is not referenced.

in
ldz

The leading dimension of the array Z. ldz >= 1, and if jobz = ‘V’, ldz >= max(1, n).

out
work

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

in
lwork

The dimension of the array work. If n <= 1, lwork must be at least 1. If jobz = ‘N’ and n > 1, lwork must be at least 2*n. If jobz = ‘V’ and n > 1, lwork must be at least 1 + 6*n + n**2. If lwork = -1, a workspace query is assumed.

out
iwork

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

in
liwork

The dimension of the array iwork. If jobz = ‘N’ or n <= 1, liwork must be at least 1. If jobz = ‘V’ and n > 1, liwork must be at least 3 + 5*n. If liwork = -1, a workspace query is assumed.

out
info

  • = 0: successful exit

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

  • > 0: if info = i, the algorithm failed to converge.

Functions

void dspevd(
    const char*          jobz,
    const char*          uplo,
    const INT            n,
          f64*  restrict AP,
          f64*  restrict W,
          f64*  restrict Z,
    const INT            ldz,
          f64*  restrict work,
    const INT            lwork,
          INT*  restrict iwork,
    const INT            liwork,
          INT*           info
);
void dspevd(const char *jobz, const char *uplo, const INT n, f64 *restrict AP, f64 *restrict W, f64 *restrict Z, const INT ldz, f64 *restrict work, const INT lwork, INT *restrict iwork, const INT liwork, INT *info)#

DSPEVD computes all the eigenvalues and, optionally, eigenvectors of a real symmetric matrix A in packed storage.

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

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
AP

Double precision array, dimension (n*(n+1)/2). On entry, the upper or lower triangle of the symmetric matrix A, packed columnwise. On exit, AP is overwritten by values generated during the reduction to tridiagonal form.

out
W

Double precision array, dimension (n). If info = 0, the eigenvalues in ascending order.

out
Z

Double precision array, dimension (ldz, n). If jobz = ‘V’, then if info = 0, Z contains the orthonormal eigenvectors of the matrix A. If jobz = ‘N’, then Z is not referenced.

in
ldz

The leading dimension of the array Z. ldz >= 1, and if jobz = ‘V’, ldz >= max(1, n).

out
work

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

in
lwork

The dimension of the array work. If n <= 1, lwork must be at least 1. If jobz = ‘N’ and n > 1, lwork must be at least 2*n. If jobz = ‘V’ and n > 1, lwork must be at least 1 + 6*n + n**2. If lwork = -1, a workspace query is assumed.

out
iwork

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

in
liwork

The dimension of the array iwork. If jobz = ‘N’ or n <= 1, liwork must be at least 1. If jobz = ‘V’ and n > 1, liwork must be at least 3 + 5*n. If liwork = -1, a workspace query is assumed.

out
info

  • = 0: successful exit

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

  • > 0: if info = i, the algorithm failed to converge.