160 SUBROUTINE chesv_aa( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
169 INTEGER INFO, LDA, LDB, LWORK, N, NRHS
173 COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
180 INTEGER LWKOPT, LWKOPT_HETRF, LWKOPT_HETRS
186 EXTERNAL lsame, ilaenv, sroundup_lwork
199 lquery = ( lwork.EQ.-1 )
200 IF( .NOT.lsame( uplo,
'U' ) .AND. .NOT.lsame( uplo,
'L' ) )
THEN
202 ELSE IF( n.LT.0 )
THEN
204 ELSE IF( nrhs.LT.0 )
THEN
206 ELSE IF( lda.LT.max( 1, n ) )
THEN
208 ELSE IF( ldb.LT.max( 1, n ) )
THEN
210 ELSE IF( lwork.LT.max( 2*n, 3*n-2 ) .AND. .NOT.lquery )
THEN
215 CALL chetrf_aa( uplo, n, a, lda, ipiv, work, -1, info )
216 lwkopt_hetrf = int( work(1) )
217 CALL chetrs_aa( uplo, n, nrhs, a, lda, ipiv, b, ldb, work,
219 lwkopt_hetrs = int( work(1) )
220 lwkopt = max( lwkopt_hetrf, lwkopt_hetrs )
221 work( 1 ) = sroundup_lwork(lwkopt)
225 CALL xerbla(
'CHESV_AA ', -info )
227 ELSE IF( lquery )
THEN
233 CALL chetrf_aa( uplo, n, a, lda, ipiv, work, lwork, info )
238 CALL chetrs_aa( uplo, n, nrhs, a, lda, ipiv, b, ldb, work,
243 work( 1 ) = sroundup_lwork(lwkopt)
subroutine xerbla(srname, info)
subroutine chesv_aa(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
CHESV_AA computes the solution to system of linear equations A * X = B for HE matrices
subroutine chetrf_aa(uplo, n, a, lda, ipiv, work, lwork, info)
CHETRF_AA
subroutine chetrs_aa(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
CHETRS_AA