129 SUBROUTINE chetrs_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(
'CHETRS_AA', -info )
188 ELSE IF( lquery )
THEN
190 work( 1 ) = sroundup_lwork(lwkopt)
196 IF( n.EQ.0 .OR. nrhs.EQ.0 )
213 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
219 CALL ctrsm(
'L',
'U',
'C',
'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( 2*n ), 1)
230 CALL clacpy(
'F', 1, n-1, a( 1, 2 ), lda+1, work( 1 ), 1)
231 CALL clacgv( n-1, work( 1 ), 1 )
233 CALL cgtsv(n, nrhs, work(1), work(n), work(2*n), b, ldb,
242 CALL ctrsm(
'L',
'U',
'N',
'U', n-1, nrhs, one, a( 1, 2 ),
251 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
270 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
276 CALL ctrsm(
'L',
'L',
'N',
'U', n-1, nrhs, one, a( 2, 1),
277 $ lda, b(2, 1), ldb )
284 CALL clacpy(
'F', 1, n, a(1, 1), lda+1, work(n), 1)
286 CALL clacpy(
'F', 1, n-1, a( 2, 1 ), lda+1, work( 1 ), 1 )
287 CALL clacpy(
'F', 1, n-1, a( 2, 1 ), lda+1, work( 2*n ), 1)
288 CALL clacgv( n-1, work( 2*n ), 1 )
290 CALL cgtsv(n, nrhs, work(1), work(n), work(2*n), b, ldb,
299 CALL ctrsm(
'L',
'L',
'C',
'U', n-1, nrhs, one, a( 2, 1 ),
300 $ lda, b( 2, 1 ), ldb )
308 $
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 chetrs_aa(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
CHETRS_AA
subroutine clacgv(n, x, incx)
CLACGV conjugates a complex vector.
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