130 SUBROUTINE zhetrs_aa( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
131 $ WORK, LWORK, INFO )
141 INTEGER N, NRHS, LDA, LDB, LWORK, INFO
145 COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
151 parameter( one = 1.0d+0 )
154 LOGICAL LQUERY, UPPER
155 INTEGER K, KP, LWKOPT
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(
'ZHETRS_AA', -info )
188 ELSE IF( lquery )
THEN
196 IF( n.EQ.0 .OR. nrhs.EQ.0 )
212 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
217 CALL ztrsm(
'L',
'U',
'C',
'U', n-1, nrhs, one, a( 1, 2 ),
218 $ lda, b( 2, 1 ), ldb )
225 CALL zlacpy(
'F', 1, n, a(1, 1), lda+1, work(n), 1 )
227 CALL zlacpy(
'F', 1, n-1, a( 1, 2 ), lda+1, work( 2*n ), 1)
228 CALL zlacpy(
'F', 1, n-1, a( 1, 2 ), lda+1, work( 1 ), 1 )
229 CALL zlacgv( n-1, work( 1 ), 1 )
231 CALL zgtsv( n, nrhs, work(1), work(n), work(2*n), b, ldb,
240 CALL ztrsm(
'L',
'U',
'N',
'U', n-1, nrhs, one, a( 1, 2 ),
248 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
265 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
270 CALL ztrsm(
'L',
'L',
'N',
'U', n-1, nrhs, one, a( 2, 1 ),
278 CALL zlacpy(
'F', 1, n, a(1, 1), lda+1, work(n), 1)
280 CALL zlacpy(
'F', 1, n-1, a( 2, 1 ), lda+1, work( 1 ), 1)
281 CALL zlacpy(
'F', 1, n-1, a( 2, 1 ), lda+1, work( 2*n ), 1)
282 CALL zlacgv( n-1, work( 2*n ), 1 )
284 CALL zgtsv(n, nrhs, work(1), work(n), work(2*n), b, ldb,
293 CALL ztrsm(
'L',
'L',
'C',
'U', n-1, nrhs, one, a( 2, 1 ),
294 $ lda, b( 2, 1 ), ldb)
301 $
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 zhetrs_aa(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
ZHETRS_AA
subroutine zlacgv(n, x, incx)
ZLACGV conjugates a complex vector.
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