sstedc - compute all eigenvalues and, optionally, eigenvectors of a symmetric tridiagonal matrix using the divide and conquer method
SUBROUTINE SSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK, * LIWORK, INFO) CHARACTER * 1 COMPZ INTEGER N, LDZ, LWORK, LIWORK, INFO INTEGER IWORK(*) REAL D(*), E(*), Z(LDZ,*), WORK(*)
SUBROUTINE SSTEDC_64( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK, * LIWORK, INFO) CHARACTER * 1 COMPZ INTEGER*8 N, LDZ, LWORK, LIWORK, INFO INTEGER*8 IWORK(*) REAL D(*), E(*), Z(LDZ,*), WORK(*)
SUBROUTINE STEDC( COMPZ, N, D, E, Z, [LDZ], WORK, [LWORK], IWORK, * [LIWORK], [INFO]) CHARACTER(LEN=1) :: COMPZ INTEGER :: N, LDZ, LWORK, LIWORK, INFO INTEGER, DIMENSION(:) :: IWORK REAL, DIMENSION(:) :: D, E, WORK REAL, DIMENSION(:,:) :: Z
SUBROUTINE STEDC_64( COMPZ, N, D, E, Z, [LDZ], WORK, [LWORK], IWORK, * [LIWORK], [INFO]) CHARACTER(LEN=1) :: COMPZ INTEGER(8) :: N, LDZ, LWORK, LIWORK, INFO INTEGER(8), DIMENSION(:) :: IWORK REAL, DIMENSION(:) :: D, E, WORK REAL, DIMENSION(:,:) :: Z
#include <sunperf.h>
void sstedc(char compz, int n, float *d, float *e, float *z, int ldz, float *work, int lwork, int *iwork, int liwork, int *info);
void sstedc_64(char compz, long n, float *d, float *e, float *z, long ldz, float *work, long lwork, long *iwork, long liwork, long *info);
sstedc computes all eigenvalues and, optionally, eigenvectors of a symmetric tridiagonal matrix using the divide and conquer method. The eigenvectors of a full or band real symmetric matrix can also be found if SSYTRD or SSPTRD or SSBTRD has been used to reduce this matrix to tridiagonal form.
This code makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none. See SLAED3 for details.
= 'N': Compute eigenvalues only.
= 'I': Compute eigenvectors of tridiagonal matrix also.
= 'V': Compute eigenvectors of original dense symmetric matrix also. On entry, Z contains the orthogonal matrix used to reduce the original matrix to tridiagonal form.
WORK(1)
returns the optimal LWORK.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
IWORK(1)
returns the optimal LIWORK.
If LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the IWORK array, returns this value as the first entry of the IWORK array, and no error message related to LIWORK is issued by XERBLA.
= 0: successful exit.
< 0: if INFO = -i, the i-th argument had an illegal value.
> 0: 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).
Based on contributions by
Jeff Rutter, Computer Science Division, University of California at Berkeley, USA
Modified by Francoise Tisseur, University of Tennessee.