227 SUBROUTINE dsygvd( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
228 $ lwork, iwork, liwork, info )
237 INTEGER INFO, ITYPE, LDA, LDB, LIWORK, LWORK, N
241 DOUBLE PRECISION A( lda, * ), B( ldb, * ), W( * ), WORK( * )
248 parameter ( one = 1.0d+0 )
251 LOGICAL LQUERY, UPPER, WANTZ
253 INTEGER LIOPT, LIWMIN, LOPT, LWMIN
269 wantz = lsame( jobz,
'V' )
270 upper = lsame( uplo,
'U' )
271 lquery = ( lwork.EQ.-1 .OR. liwork.EQ.-1 )
277 ELSE IF( wantz )
THEN
279 lwmin = 1 + 6*n + 2*n**2
286 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
288 ELSE IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
290 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
292 ELSE IF( n.LT.0 )
THEN
294 ELSE IF( lda.LT.max( 1, n ) )
THEN
296 ELSE IF( ldb.LT.max( 1, n ) )
THEN
304 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
306 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
312 CALL xerbla(
'DSYGVD', -info )
314 ELSE IF( lquery )
THEN
325 CALL dpotrf( uplo, n, b, ldb, info )
333 CALL dsygst( itype, uplo, n, a, lda, b, ldb, info )
334 CALL dsyevd( jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork,
336 lopt = max( dble( lopt ), dble( work( 1 ) ) )
337 liopt = max( dble( liopt ), dble( iwork( 1 ) ) )
339 IF( wantz .AND. info.EQ.0 )
THEN
343 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
354 CALL dtrsm(
'Left', uplo, trans,
'Non-unit', n, n, one,
357 ELSE IF( itype.EQ.3 )
THEN
368 CALL dtrmm(
'Left', uplo, trans,
'Non-unit', n, n, one,
subroutine dtrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
DTRSM
subroutine dpotrf(UPLO, N, A, LDA, INFO)
DPOTRF
subroutine dtrmm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
DTRMM
subroutine dsygvd(ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK, LWORK, IWORK, LIWORK, INFO)
DSYGVD
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dsyevd(JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, IWORK, LIWORK, INFO)
DSYEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices ...
subroutine dsygst(ITYPE, UPLO, N, A, LDA, B, LDB, INFO)
DSYGST