175 SUBROUTINE dsygv( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
185 INTEGER info, itype, lda, ldb, lwork, n
188 DOUBLE PRECISION a( lda, * ), b( ldb, * ), w( * ), work( * )
195 parameter( one = 1.0d+0 )
198 LOGICAL lquery, upper, wantz
200 INTEGER lwkmin, lwkopt, nb, neig
217 wantz =
lsame( jobz,
'V' )
218 upper =
lsame( uplo,
'U' )
219 lquery = ( lwork.EQ.-1 )
222 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
224 ELSE IF( .NOT.( wantz .OR.
lsame( jobz,
'N' ) ) )
THEN
226 ELSE IF( .NOT.( upper .OR.
lsame( uplo,
'L' ) ) )
THEN
228 ELSE IF( n.LT.0 )
THEN
230 ELSE IF( lda.LT.max( 1, n ) )
THEN
232 ELSE IF( ldb.LT.max( 1, n ) )
THEN
237 lwkmin = max( 1, 3*n - 1 )
238 nb =
ilaenv( 1,
'DSYTRD', uplo, n, -1, -1, -1 )
239 lwkopt = max( lwkmin, ( nb + 2 )*n )
242 IF( lwork.LT.lwkmin .AND. .NOT.lquery )
THEN
248 CALL
xerbla(
'DSYGV ', -info )
250 ELSE IF( lquery )
THEN
261 CALL
dpotrf( uplo, n, b, ldb, info )
269 CALL
dsygst( itype, uplo, n, a, lda, b, ldb, info )
270 CALL
dsyev( jobz, uplo, n, a, lda, w, work, lwork, info )
279 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
290 CALL
dtrsm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
293 ELSE IF( itype.EQ.3 )
THEN
304 CALL
dtrmm(
'Left', uplo, trans,
'Non-unit', n, neig, one,