106 SUBROUTINE ctrtri( UPLO, DIAG, N, A, LDA, INFO )
124 parameter( one = ( 1.0e+0, 0.0e+0 ),
125 $ zero = ( 0.0e+0, 0.0e+0 ) )
128 LOGICAL NOUNIT, UPPER
129 INTEGER J, JB, NB, NN
134 EXTERNAL lsame, ilaenv
147 upper = lsame( uplo,
'U' )
148 nounit = lsame( diag,
'N' )
149 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
151 ELSE IF( .NOT.nounit .AND. .NOT.lsame( diag,
'U' ) )
THEN
153 ELSE IF( n.LT.0 )
THEN
155 ELSE IF( lda.LT.max( 1, n ) )
THEN
159 CALL xerbla(
'CTRTRI', -info )
172 IF( a( info, info ).EQ.zero )
180 nb = ilaenv( 1,
'CTRTRI', uplo // diag, n, -1, -1, -1 )
181 IF( nb.LE.1 .OR. nb.GE.n )
THEN
185 CALL ctrti2( uplo, diag, n, a, lda, info )
195 jb = min( nb, n-j+1 )
199 CALL ctrmm(
'Left',
'Upper',
'No transpose', diag,
201 $ jb, one, a, lda, a( 1, j ), lda )
202 CALL ctrsm(
'Right',
'Upper',
'No transpose', diag,
204 $ jb, -one, a( j, j ), lda, a( 1, j ), lda )
208 CALL ctrti2(
'Upper', diag, jb, a( j, j ), lda, info )
214 nn = ( ( n-1 ) / nb )*nb + 1
216 jb = min( nb, n-j+1 )
221 CALL ctrmm(
'Left',
'Lower',
'No transpose', diag,
222 $ n-j-jb+1, jb, one, a( j+jb, j+jb ), lda,
223 $ a( j+jb, j ), lda )
224 CALL ctrsm(
'Right',
'Lower',
'No transpose', diag,
225 $ n-j-jb+1, jb, -one, a( j, j ), lda,
226 $ a( j+jb, j ), lda )
231 CALL ctrti2(
'Lower', diag, jb, a( j, j ), lda, info )
subroutine ctrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
CTRMM
subroutine ctrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
CTRSM
subroutine ctrti2(uplo, diag, n, a, lda, info)
CTRTI2 computes the inverse of a triangular matrix (unblocked algorithm).