129 SUBROUTINE csytrs_aa( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
130 $ WORK, LWORK, INFO )
140 INTEGER N, NRHS, LDA, LDB, LWORK, INFO
144 COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
150 parameter( one = 1.0e+0 )
153 LOGICAL LQUERY, UPPER
154 INTEGER K, KP, LWKOPT
159 EXTERNAL lsame, sroundup_lwork
170 upper = lsame( uplo,
'U' )
171 lquery = ( lwork.EQ.-1 )
172 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
174 ELSE IF( n.LT.0 )
THEN
176 ELSE IF( nrhs.LT.0 )
THEN
178 ELSE IF( lda.LT.max( 1, n ) )
THEN
180 ELSE IF( ldb.LT.max( 1, n ) )
THEN
182 ELSE IF( lwork.LT.max( 1, 3*n-2 ) .AND. .NOT.lquery )
THEN
186 CALL xerbla(
'CSYTRS_AA', -info )
188 ELSE IF( lquery )
THEN
190 work( 1 ) = sroundup_lwork(lwkopt)
196 IF( n.EQ.0 .OR. nrhs.EQ.0 )
212 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
217 CALL ctrsm(
'L',
'U',
'T',
'U', n-1, nrhs, one, a( 1, 2 ),
218 $ lda, b( 2, 1 ), ldb)
225 CALL clacpy(
'F', 1, n, a( 1, 1 ), lda+1, work( n ), 1)
227 CALL clacpy(
'F', 1, n-1, a( 1, 2 ), lda+1, work( 1 ), 1 )
228 CALL clacpy(
'F', 1, n-1, a( 1, 2 ), lda+1, work( 2*n ), 1 )
230 CALL cgtsv( n, nrhs, work( 1 ), work( n ), work( 2*n ), b, ldb,
239 CALL ctrsm(
'L',
'U',
'N',
'U', n-1, nrhs, one, a( 1, 2 ),
240 $ lda, b( 2, 1 ), ldb)
247 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
264 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
269 CALL ctrsm(
'L',
'L',
'N',
'U', n-1, nrhs, one, a( 2, 1 ),
270 $ lda, b( 2, 1 ), ldb)
278 CALL clacpy(
'F', 1, n, a(1, 1), lda+1, work(n), 1)
280 CALL clacpy(
'F', 1, n-1, a( 2, 1 ), lda+1, work( 1 ), 1 )
281 CALL clacpy(
'F', 1, n-1, a( 2, 1 ), lda+1, work( 2*n ), 1 )
283 CALL cgtsv( n, nrhs, work( 1 ), work(n), work( 2*n ), b, ldb,
292 CALL ctrsm(
'L',
'L',
'T',
'U', n-1, nrhs, one, a( 2, 1 ),
293 $ lda, b( 2, 1 ), ldb)
300 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
subroutine xerbla(srname, info)
subroutine cgtsv(n, nrhs, dl, d, du, b, ldb, info)
CGTSV computes the solution to system of linear equations A * X = B for GT matrices
subroutine csytrs_aa(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
CSYTRS_AA
subroutine clacpy(uplo, m, n, a, lda, b, ldb)
CLACPY copies all or part of one two-dimensional array to another.
subroutine cswap(n, cx, incx, cy, incy)
CSWAP
subroutine ctrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
CTRSM