129 SUBROUTINE dsytrs_aa( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
130 $ work, lwork, info )
141 INTEGER N, NRHS, LDA, LDB, LWORK, INFO
145 DOUBLE PRECISION 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(
'DSYTRS_AA', -info )
188 ELSE IF( lquery )
THEN
196 IF( n.EQ.0 .OR. nrhs.EQ.0 )
208 $
CALL dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
213 CALL dtrsm(
'L',
'U',
'T',
'U', n-1, nrhs, one, a( 1, 2 ), lda,
218 CALL dlacpy(
'F', 1, n, a( 1, 1 ), lda+1, work( n ), 1)
220 CALL dlacpy(
'F', 1, n-1, a( 1, 2 ), lda+1, work( 1 ), 1 )
221 CALL dlacpy(
'F', 1, n-1, a( 1, 2 ), lda+1, work( 2*n ), 1 )
223 CALL dgtsv( n, nrhs, work( 1 ), work( n ), work( 2*n ), b, ldb,
228 CALL dtrsm(
'L',
'U',
'N',
'U', n-1, nrhs, one, a( 1, 2 ), lda,
236 $
CALL dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
248 $
CALL dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
253 CALL dtrsm(
'L',
'L',
'N',
'U', n-1, nrhs, one, a( 2, 1 ), lda,
258 CALL dlacpy(
'F', 1, n, a(1, 1), lda+1, work(n), 1)
260 CALL dlacpy(
'F', 1, n-1, a( 2, 1 ), lda+1, work( 1 ), 1 )
261 CALL dlacpy(
'F', 1, n-1, a( 2, 1 ), lda+1, work( 2*n ), 1 )
263 CALL dgtsv( n, nrhs, work( 1 ), work(n), work( 2*n ), b, ldb,
268 CALL dtrsm(
'L',
'L',
'T',
'U', n-1, nrhs, one, a( 2, 1 ), lda,
276 $
CALL dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
subroutine dlacpy(UPLO, M, N, A, LDA, B, LDB)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dgtsv(N, NRHS, DL, D, DU, B, LDB, INFO)
DGTSV computes the solution to system of linear equations A * X = B for GT matrices ...
subroutine dtrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
DTRSM
subroutine dswap(N, DX, INCX, DY, INCY)
DSWAP
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dsytrs_aa(UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK, LWORK, INFO)
DSYTRS_AA