heev#

Functions

void cheev(
    const char*          jobz,
    const char*          uplo,
    const INT            n,
          c64*  restrict A,
    const INT            lda,
          f32*  restrict W,
          c64*  restrict work,
    const INT            lwork,
          f32*  restrict rwork,
          INT*           info
);
void cheev(const char *jobz, const char *uplo, const INT n, c64 *restrict A, const INT lda, f32 *restrict W, c64 *restrict work, const INT lwork, f32 *restrict rwork, INT *info)#

CHEEV computes all eigenvalues and, optionally, eigenvectors of a complex Hermitian matrix A.

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 Hermitian matrix A. If UPLO = ‘U’, the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A. If UPLO = ‘L’, the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A. On exit, if JOBZ = ‘V’, then if INFO = 0, A contains the orthonormal eigenvectors of the matrix A. If JOBZ = ‘N’, then on exit the lower triangle (if UPLO=’L’) or the upper triangle (if UPLO=’U’) of A, including the diagonal, is destroyed.

in
lda

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

out
W

Array of dimension (n). If INFO = 0, the eigenvalues in ascending order.

out
work

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

in
lwork

The length of the array work. lwork >= max(1, 2*n-1). For optimal efficiency, lwork >= (NB+1)*N where NB is the blocksize for CHETRD. If lwork = -1, workspace query only.

out
rwork

Single precision workspace array, dimension (max(1, 3*n-2)).

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; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero.

Functions

void zheev(
    const char*          jobz,
    const char*          uplo,
    const INT            n,
          c128* restrict A,
    const INT            lda,
          f64*  restrict W,
          c128* restrict work,
    const INT            lwork,
          f64*  restrict rwork,
          INT*           info
);
void zheev(const char *jobz, const char *uplo, const INT n, c128 *restrict A, const INT lda, f64 *restrict W, c128 *restrict work, const INT lwork, f64 *restrict rwork, INT *info)#

ZHEEV computes all eigenvalues and, optionally, eigenvectors of a complex Hermitian matrix A.

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 Hermitian matrix A. If UPLO = ‘U’, the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A. If UPLO = ‘L’, the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A. On exit, if JOBZ = ‘V’, then if INFO = 0, A contains the orthonormal eigenvectors of the matrix A. If JOBZ = ‘N’, then on exit the lower triangle (if UPLO=’L’) or the upper triangle (if UPLO=’U’) of A, including the diagonal, is destroyed.

in
lda

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

out
W

Array of dimension (n). If INFO = 0, the eigenvalues in ascending order.

out
work

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

in
lwork

The length of the array work. lwork >= max(1, 2*n-1). For optimal efficiency, lwork >= (NB+1)*N where NB is the blocksize for ZHETRD. If lwork = -1, workspace query only.

out
rwork

Double precision workspace array, dimension (max(1, 3*n-2)).

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; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero.