106 SUBROUTINE strtri( UPLO, DIAG, N, A, LDA, INFO )
124 parameter( one = 1.0e+0, zero = 0.0e+0 )
127 LOGICAL NOUNIT, UPPER
128 INTEGER J, JB, NB, NN
133 EXTERNAL lsame, ilaenv
146 upper = lsame( uplo,
'U' )
147 nounit = lsame( diag,
'N' )
148 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
150 ELSE IF( .NOT.nounit .AND. .NOT.lsame( diag,
'U' ) )
THEN
152 ELSE IF( n.LT.0 )
THEN
154 ELSE IF( lda.LT.max( 1, n ) )
THEN
158 CALL xerbla(
'STRTRI', -info )
171 IF( a( info, info ).EQ.zero )
179 nb = ilaenv( 1,
'STRTRI', uplo // diag, n, -1, -1, -1 )
180 IF( nb.LE.1 .OR. nb.GE.n )
THEN
184 CALL strti2( uplo, diag, n, a, lda, info )
194 jb = min( nb, n-j+1 )
198 CALL strmm(
'Left',
'Upper',
'No transpose', diag,
200 $ jb, one, a, lda, a( 1, j ), lda )
201 CALL strsm(
'Right',
'Upper',
'No transpose', diag,
203 $ jb, -one, a( j, j ), lda, a( 1, j ), lda )
207 CALL strti2(
'Upper', diag, jb, a( j, j ), lda, info )
213 nn = ( ( n-1 ) / nb )*nb + 1
215 jb = min( nb, n-j+1 )
220 CALL strmm(
'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 strsm(
'Right',
'Lower',
'No transpose', diag,
224 $ n-j-jb+1, jb, -one, a( j, j ), lda,
225 $ a( j+jb, j ), lda )
230 CALL strti2(
'Lower', diag, jb, a( j, j ), lda, info )
subroutine strmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
STRMM
subroutine strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
STRSM
subroutine strti2(uplo, diag, n, a, lda, info)
STRTI2 computes the inverse of a triangular matrix (unblocked algorithm).