134 SUBROUTINE zhetrs_aa( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
135 $ WORK, LWORK, INFO )
145 INTEGER N, NRHS, LDA, LDB, LWORK, INFO
149 COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
155 parameter( one = 1.0d+0 )
158 LOGICAL LQUERY, UPPER
159 INTEGER K, KP, LWKMIN
175 upper = lsame( uplo,
'U' )
176 lquery = ( lwork.EQ.-1 )
177 IF( min( n, nrhs ).EQ.0 )
THEN
183 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
185 ELSE IF( n.LT.0 )
THEN
187 ELSE IF( nrhs.LT.0 )
THEN
189 ELSE IF( lda.LT.max( 1, n ) )
THEN
191 ELSE IF( ldb.LT.max( 1, n ) )
THEN
193 ELSE IF( lwork.LT.lwkmin .AND. .NOT.lquery )
THEN
197 CALL xerbla(
'ZHETRS_AA', -info )
199 ELSE IF( lquery )
THEN
206 IF( min( n, nrhs ).EQ.0 )
222 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
227 CALL ztrsm(
'L',
'U',
'C',
'U', n-1, nrhs, one, a( 1,
229 $ lda, b( 2, 1 ), ldb )
236 CALL zlacpy(
'F', 1, n, a(1, 1), lda+1, work(n), 1 )
238 CALL zlacpy(
'F', 1, n-1, a( 1, 2 ), lda+1, work( 2*n ),
240 CALL zlacpy(
'F', 1, n-1, a( 1, 2 ), lda+1, work( 1 ),
242 CALL zlacgv( n-1, work( 1 ), 1 )
244 CALL zgtsv( n, nrhs, work(1), work(n), work(2*n), b, ldb,
253 CALL ztrsm(
'L',
'U',
'N',
'U', n-1, nrhs, one, a( 1,
262 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
279 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
284 CALL ztrsm(
'L',
'L',
'N',
'U', n-1, nrhs, one, a( 2,
293 CALL zlacpy(
'F', 1, n, a(1, 1), lda+1, work(n), 1)
295 CALL zlacpy(
'F', 1, n-1, a( 2, 1 ), lda+1, work( 1 ),
297 CALL zlacpy(
'F', 1, n-1, a( 2, 1 ), lda+1, work( 2*n ),
299 CALL zlacgv( n-1, work( 2*n ), 1 )
301 CALL zgtsv(n, nrhs, work(1), work(n), work(2*n), b, ldb,
310 CALL ztrsm(
'L',
'L',
'C',
'U', n-1, nrhs, one, a( 2,
312 $ lda, b( 2, 1 ), ldb)
319 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
subroutine zgtsv(n, nrhs, dl, d, du, b, ldb, info)
ZGTSV computes the solution to system of linear equations A * X = B for GT matrices
subroutine ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
ZTRSM