219 SUBROUTINE dsygvd( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
220 $ LWORK, IWORK, LIWORK, INFO )
228 INTEGER INFO, ITYPE, LDA, LDB, LIWORK, LWORK, N
232 DOUBLE PRECISION A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
239 parameter( one = 1.0d+0 )
242 LOGICAL LQUERY, UPPER, WANTZ
244 INTEGER LIOPT, LIWMIN, LOPT, LWMIN
260 wantz = lsame( jobz,
'V' )
261 upper = lsame( uplo,
'U' )
262 lquery = ( lwork.EQ.-1 .OR. liwork.EQ.-1 )
268 ELSE IF( wantz )
THEN
270 lwmin = 1 + 6*n + 2*n**2
277 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
279 ELSE IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
281 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
283 ELSE IF( n.LT.0 )
THEN
285 ELSE IF( lda.LT.max( 1, n ) )
THEN
287 ELSE IF( ldb.LT.max( 1, n ) )
THEN
295 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
297 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
303 CALL xerbla(
'DSYGVD', -info )
305 ELSE IF( lquery )
THEN
316 CALL dpotrf( uplo, n, b, ldb, info )
324 CALL dsygst( itype, uplo, n, a, lda, b, ldb, info )
325 CALL dsyevd( jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork,
327 lopt = int( max( dble( lopt ), dble( work( 1 ) ) ) )
328 liopt = int( max( dble( liopt ), dble( iwork( 1 ) ) ) )
330 IF( wantz .AND. info.EQ.0 )
THEN
334 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
345 CALL dtrsm(
'Left', uplo, trans,
'Non-unit', n, n, one,
348 ELSE IF( itype.EQ.3 )
THEN
359 CALL dtrmm(
'Left', uplo, trans,
'Non-unit', n, n, one,
subroutine xerbla(srname, info)
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
subroutine dsygvd(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, iwork, liwork, info)
DSYGVD
subroutine dpotrf(uplo, n, a, lda, info)
DPOTRF
subroutine dtrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
DTRMM
subroutine dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
DTRSM