217 SUBROUTINE ssygvd( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W,
219 $ LWORK, IWORK, LIWORK, INFO )
227 INTEGER INFO, ITYPE, LDA, LDB, LIWORK, LWORK, N
231 REAL A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
238 PARAMETER ( ONE = 1.0e+0 )
241 LOGICAL LQUERY, UPPER, WANTZ
243 INTEGER LIOPT, LIWMIN, LOPT, LWMIN
248 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,
329 lopt = int( max( real( lopt ), real( work( 1 ) ) ) )
330 liopt = int( max( real( liopt ), real( iwork( 1 ) ) ) )
332 IF( wantz .AND. info.EQ.0 )
THEN
336 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
347 CALL strsm(
'Left', uplo, trans,
'Non-unit', n, n, one,
350 ELSE IF( itype.EQ.3 )
THEN
361 CALL strmm(
'Left', uplo, trans,
'Non-unit', n, n, one,
366 work( 1 ) = sroundup_lwork(lopt)
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 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