173 SUBROUTINE ssygv( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
182 INTEGER INFO, ITYPE, LDA, LDB, LWORK, N
185 REAL A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
192 parameter( one = 1.0e+0 )
195 LOGICAL LQUERY, UPPER, WANTZ
197 INTEGER LWKMIN, LWKOPT, NB, NEIG
203 EXTERNAL ilaenv, lsame, sroundup_lwork
215 wantz = lsame( jobz,
'V' )
216 upper = lsame( uplo,
'U' )
217 lquery = ( lwork.EQ.-1 )
220 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
222 ELSE IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
224 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
226 ELSE IF( n.LT.0 )
THEN
228 ELSE IF( lda.LT.max( 1, n ) )
THEN
230 ELSE IF( ldb.LT.max( 1, n ) )
THEN
235 lwkmin = max( 1, 3*n - 1 )
236 nb = ilaenv( 1,
'SSYTRD', uplo, n, -1, -1, -1 )
237 lwkopt = max( lwkmin, ( nb + 2 )*n )
238 work( 1 ) = sroundup_lwork(lwkopt)
240 IF( lwork.LT.lwkmin .AND. .NOT.lquery )
THEN
246 CALL xerbla(
'SSYGV ', -info )
248 ELSE IF( lquery )
THEN
259 CALL spotrf( uplo, n, b, ldb, info )
267 CALL ssygst( itype, uplo, n, a, lda, b, ldb, info )
268 CALL ssyev( jobz, uplo, n, a, lda, w, work, lwork, info )
277 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
288 CALL strsm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
291 ELSE IF( itype.EQ.3 )
THEN
302 CALL strmm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
307 work( 1 ) = sroundup_lwork(lwkopt)
subroutine xerbla(srname, info)
subroutine ssyev(jobz, uplo, n, a, lda, w, work, lwork, info)
SSYEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices
subroutine ssygst(itype, uplo, n, a, lda, b, ldb, info)
SSYGST
subroutine ssygv(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, info)
SSYGV
subroutine spotrf(uplo, n, a, lda, info)
SPOTRF
subroutine strmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
STRMM
subroutine strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
STRSM