108 SUBROUTINE dtrtri( UPLO, DIAG, N, A, LDA, INFO )
119 DOUBLE PRECISION A( LDA, * )
125 DOUBLE PRECISION ONE, ZERO
126 parameter( one = 1.0d+0, zero = 0.0d+0 )
129 LOGICAL NOUNIT, UPPER
130 INTEGER J, JB, NB, NN
135 EXTERNAL lsame, ilaenv
148 upper = lsame( uplo,
'U' )
149 nounit = lsame( diag,
'N' )
150 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
152 ELSE IF( .NOT.nounit .AND. .NOT.lsame( diag,
'U' ) )
THEN
154 ELSE IF( n.LT.0 )
THEN
156 ELSE IF( lda.LT.max( 1, n ) )
THEN
160 CALL xerbla(
'DTRTRI', -info )
173 IF( a( info, info ).EQ.zero )
181 nb = ilaenv( 1,
'DTRTRI', uplo // diag, n, -1, -1, -1 )
182 IF( nb.LE.1 .OR. nb.GE.n )
THEN
186 CALL dtrti2( uplo, diag, n, a, lda, info )
196 jb = min( nb, n-j+1 )
200 CALL dtrmm(
'Left',
'Upper',
'No transpose', diag, j-1,
201 $ jb, one, a, lda, a( 1, j ), lda )
202 CALL dtrsm(
'Right',
'Upper',
'No transpose', diag, j-1,
203 $ jb, -one, a( j, j ), lda, a( 1, j ), lda )
207 CALL dtrti2(
'Upper', diag, jb, a( j, j ), lda, info )
213 nn = ( ( n-1 ) / nb )*nb + 1
215 jb = min( nb, n-j+1 )
220 CALL dtrmm(
'Left',
'Lower',
'No transpose', diag,
221 $ n-j-jb+1, jb, one, a( j+jb, j+jb ), lda,
222 $ a( j+jb, j ), lda )
223 CALL dtrsm(
'Right',
'Lower',
'No transpose', diag,
224 $ n-j-jb+1, jb, -one, a( j, j ), lda,
225 $ a( j+jb, j ), lda )
230 CALL dtrti2(
'Lower', diag, jb, a( j, j ), lda, info )
subroutine xerbla(srname, info)
subroutine dtrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
DTRMM
subroutine dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
DTRSM
subroutine dtrti2(uplo, diag, n, a, lda, info)
DTRTI2 computes the inverse of a triangular matrix (unblocked algorithm).
subroutine dtrtri(uplo, diag, n, a, lda, info)
DTRTRI