129 SUBROUTINE csytrs_aa( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
130 $ work, lwork, info )
141 INTEGER N, NRHS, LDA, LDB, LWORK, INFO
145 COMPLEX A( lda, * ), B( ldb, * ), WORK( * )
151 parameter ( one = 1.0e+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(
'CSYTRS_AA', -info )
188 ELSE IF( lquery )
THEN
196 IF( n.EQ.0 .OR. nrhs.EQ.0 )
208 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
213 CALL ctrsm(
'L',
'U',
'T',
'U', n-1, nrhs, one, a( 1, 2 ), lda,
218 CALL clacpy(
'F', 1, n, a( 1, 1 ), lda+1, work( n ), 1)
220 CALL clacpy(
'F', 1, n-1, a( 1, 2 ), lda+1, work( 1 ), 1 )
221 CALL clacpy(
'F', 1, n-1, a( 1, 2 ), lda+1, work( 2*n ), 1 )
223 CALL cgtsv( n, nrhs, work( 1 ), work( n ), work( 2*n ), b, ldb,
228 CALL ctrsm(
'L',
'U',
'N',
'U', n-1, nrhs, one, a( 1, 2 ), lda,
236 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
248 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
253 CALL ctrsm(
'L',
'L',
'N',
'U', n-1, nrhs, one, a( 2, 1 ), lda,
258 CALL clacpy(
'F', 1, n, a(1, 1), lda+1, work(n), 1)
260 CALL clacpy(
'F', 1, n-1, a( 2, 1 ), lda+1, work( 1 ), 1 )
261 CALL clacpy(
'F', 1, n-1, a( 2, 1 ), lda+1, work( 2*n ), 1 )
263 CALL cgtsv( n, nrhs, work( 1 ), work(n), work( 2*n ), b, ldb,
268 CALL ctrsm(
'L',
'L',
'T',
'U', n-1, nrhs, one, a( 2, 1 ), lda,
276 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
subroutine csytrs_aa(UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK, LWORK, INFO)
CSYTRS_AA
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 ctrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
CTRSM
subroutine xerbla(SRNAME, INFO)
XERBLA
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