131 SUBROUTINE csytrs_aa( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
132 $ WORK, LWORK, INFO )
143 INTEGER N, NRHS, LDA, LDB, LWORK, INFO
147 COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
153 parameter( one = 1.0e+0 )
156 LOGICAL LQUERY, UPPER
157 INTEGER K, KP, LWKOPT
172 upper = lsame( uplo,
'U' )
173 lquery = ( lwork.EQ.-1 )
174 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
176 ELSE IF( n.LT.0 )
THEN
178 ELSE IF( nrhs.LT.0 )
THEN
180 ELSE IF( lda.LT.max( 1, n ) )
THEN
182 ELSE IF( ldb.LT.max( 1, n ) )
THEN
184 ELSE IF( lwork.LT.max( 1, 3*n-2 ) .AND. .NOT.lquery )
THEN
188 CALL xerbla(
'CSYTRS_AA', -info )
190 ELSE IF( lquery )
THEN
198 IF( n.EQ.0 .OR. nrhs.EQ.0 )
214 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
219 CALL ctrsm(
'L',
'U',
'T',
'U', n-1, nrhs, one, a( 1, 2 ),
220 $ lda, b( 2, 1 ), ldb)
227 CALL clacpy(
'F', 1, n, a( 1, 1 ), lda+1, work( n ), 1)
229 CALL clacpy(
'F', 1, n-1, a( 1, 2 ), lda+1, work( 1 ), 1 )
230 CALL clacpy(
'F', 1, n-1, a( 1, 2 ), lda+1, work( 2*n ), 1 )
232 CALL cgtsv( n, nrhs, work( 1 ), work( n ), work( 2*n ), b, ldb,
241 CALL ctrsm(
'L',
'U',
'N',
'U', n-1, nrhs, one, a( 1, 2 ),
242 $ lda, b( 2, 1 ), ldb)
249 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
266 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
271 CALL ctrsm(
'L',
'L',
'N',
'U', n-1, nrhs, one, a( 2, 1 ),
272 $ lda, b( 2, 1 ), ldb)
280 CALL clacpy(
'F', 1, n, a(1, 1), lda+1, work(n), 1)
282 CALL clacpy(
'F', 1, n-1, a( 2, 1 ), lda+1, work( 1 ), 1 )
283 CALL clacpy(
'F', 1, n-1, a( 2, 1 ), lda+1, work( 2*n ), 1 )
285 CALL cgtsv( n, nrhs, work( 1 ), work(n), work( 2*n ), b, ldb,
294 CALL ctrsm(
'L',
'L',
'T',
'U', n-1, nrhs, one, a( 2, 1 ),
295 $ lda, b( 2, 1 ), ldb)
302 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )