129 SUBROUTINE zsytrs_aa( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
130 $ WORK, LWORK, INFO )
140 INTEGER N, NRHS, LDA, LDB, LWORK, INFO
144 COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
150 parameter( one = 1.0d+0 )
153 LOGICAL LQUERY, UPPER
154 INTEGER K, KP, LWKOPT
169 upper = lsame( uplo,
'U' )
170 lquery = ( lwork.EQ.-1 )
171 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
173 ELSE IF( n.LT.0 )
THEN
175 ELSE IF( nrhs.LT.0 )
THEN
177 ELSE IF( lda.LT.max( 1, n ) )
THEN
179 ELSE IF( ldb.LT.max( 1, n ) )
THEN
181 ELSE IF( lwork.LT.max( 1, 3*n-2 ) .AND. .NOT.lquery )
THEN
185 CALL xerbla(
'ZSYTRS_AA', -info )
187 ELSE IF( lquery )
THEN
195 IF( n.EQ.0 .OR. nrhs.EQ.0 )
211 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
216 CALL ztrsm(
'L',
'U',
'T',
'U', n-1, nrhs, one, a( 1, 2 ),
217 $ lda, b( 2, 1 ), ldb)
224 CALL zlacpy(
'F', 1, n, a( 1, 1 ), lda+1, work( n ), 1)
226 CALL zlacpy(
'F', 1, n-1, a( 1, 2 ), lda+1, work( 1 ), 1 )
227 CALL zlacpy(
'F', 1, n-1, a( 1, 2 ), lda+1, work( 2*n ), 1 )
229 CALL zgtsv( n, nrhs, work( 1 ), work( n ), work( 2*n ), b, ldb,
238 CALL ztrsm(
'L',
'U',
'N',
'U', n-1, nrhs, one, a( 1, 2 ),
239 $ lda, b( 2, 1 ), ldb)
246 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
263 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
268 CALL ztrsm(
'L',
'L',
'N',
'U', n-1, nrhs, one, a( 2, 1 ),
269 $ lda, b( 2, 1 ), ldb)
276 CALL zlacpy(
'F', 1, n, a(1, 1), lda+1, work(n), 1)
278 CALL zlacpy(
'F', 1, n-1, a( 2, 1 ), lda+1, work( 1 ), 1 )
279 CALL zlacpy(
'F', 1, n-1, a( 2, 1 ), lda+1, work( 2*n ), 1 )
281 CALL zgtsv( n, nrhs, work( 1 ), work(n), work( 2*n ), b, ldb,
290 CALL ztrsm(
'L',
'L',
'T',
'U', n-1, nrhs, one, a( 2, 1 ),
291 $ lda, b( 2, 1 ), ldb)
298 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
subroutine xerbla(srname, info)
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 zsytrs_aa(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
ZSYTRS_AA
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zswap(n, zx, incx, zy, incy)
ZSWAP
subroutine ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
ZTRSM