219 SUBROUTINE ssygvd( 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 REAL A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
239 parameter( one = 1.0e+0 )
242 LOGICAL LQUERY, UPPER, WANTZ
244 INTEGER LIOPT, LIWMIN, LOPT, LWMIN
249 EXTERNAL lsame, sroundup_lwork
261 wantz = lsame( jobz,
'V' )
262 upper = lsame( uplo,
'U' )
263 lquery = ( lwork.EQ.-1 .OR. liwork.EQ.-1 )
269 ELSE IF( wantz )
THEN
271 lwmin = 1 + 6*n + 2*n**2
278 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
280 ELSE IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
282 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
284 ELSE IF( n.LT.0 )
THEN
286 ELSE IF( lda.LT.max( 1, n ) )
THEN
288 ELSE IF( ldb.LT.max( 1, n ) )
THEN
293 work( 1 ) = sroundup_lwork(lopt)
296 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
298 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
304 CALL xerbla(
'SSYGVD', -info )
306 ELSE IF( lquery )
THEN
317 CALL spotrf( uplo, n, b, ldb, info )
325 CALL ssygst( itype, uplo, n, a, lda, b, ldb, info )
326 CALL ssyevd( jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork,
328 lopt = int( max( real( lopt ), real( work( 1 ) ) ) )
329 liopt = int( max( real( liopt ), real( iwork( 1 ) ) ) )
331 IF( wantz .AND. info.EQ.0 )
THEN
335 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
346 CALL strsm(
'Left', uplo, trans,
'Non-unit', n, n, one,
349 ELSE IF( itype.EQ.3 )
THEN
360 CALL strmm(
'Left', uplo, trans,
'Non-unit', n, n, one,
365 work( 1 ) = sroundup_lwork(lopt)
subroutine xerbla(srname, info)
subroutine ssyevd(jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork, info)
SSYEVD 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 ssygvd(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, iwork, liwork, info)
SSYGVD
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