110 SUBROUTINE ctrtri( UPLO, DIAG, N, A, LDA, INFO )
129 parameter ( one = ( 1.0e+0, 0.0e+0 ),
130 $ zero = ( 0.0e+0, 0.0e+0 ) )
133 LOGICAL NOUNIT, UPPER
134 INTEGER J, JB, NB, NN
139 EXTERNAL lsame, ilaenv
152 upper = lsame( uplo,
'U' )
153 nounit = lsame( diag,
'N' )
154 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
156 ELSE IF( .NOT.nounit .AND. .NOT.lsame( diag,
'U' ) )
THEN
158 ELSE IF( n.LT.0 )
THEN
160 ELSE IF( lda.LT.max( 1, n ) )
THEN
164 CALL xerbla(
'CTRTRI', -info )
177 IF( a( info, info ).EQ.zero )
185 nb = ilaenv( 1,
'CTRTRI', uplo // diag, n, -1, -1, -1 )
186 IF( nb.LE.1 .OR. nb.GE.n )
THEN
190 CALL ctrti2( uplo, diag, n, a, lda, info )
200 jb = min( nb, n-j+1 )
204 CALL ctrmm(
'Left',
'Upper',
'No transpose', diag, j-1,
205 $ jb, one, a, lda, a( 1, j ), lda )
206 CALL ctrsm(
'Right',
'Upper',
'No transpose', diag, j-1,
207 $ jb, -one, a( j, j ), lda, a( 1, j ), lda )
211 CALL ctrti2(
'Upper', diag, jb, a( j, j ), lda, info )
217 nn = ( ( n-1 ) / nb )*nb + 1
219 jb = min( nb, n-j+1 )
224 CALL ctrmm(
'Left',
'Lower',
'No transpose', diag,
225 $ n-j-jb+1, jb, one, a( j+jb, j+jb ), lda,
226 $ a( j+jb, j ), lda )
227 CALL ctrsm(
'Right',
'Lower',
'No transpose', diag,
228 $ n-j-jb+1, jb, -one, a( j, j ), lda,
229 $ a( j+jb, j ), lda )
234 CALL ctrti2(
'Lower', diag, jb, a( j, j ), lda, info )
subroutine ctrti2(UPLO, DIAG, N, A, LDA, INFO)
CTRTI2 computes the inverse of a triangular matrix (unblocked algorithm).
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine ctrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
CTRSM
subroutine ctrmm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
CTRMM
subroutine ctrtri(UPLO, DIAG, N, A, LDA, INFO)
CTRTRI