110 SUBROUTINE ztrtri( UPLO, DIAG, N, A, LDA, INFO )
122 COMPLEX*16 A( lda, * )
129 parameter ( one = ( 1.0d+0, 0.0d+0 ),
130 $ zero = ( 0.0d+0, 0.0d+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(
'ZTRTRI', -info )
177 IF( a( info, info ).EQ.zero )
185 nb = ilaenv( 1,
'ZTRTRI', uplo // diag, n, -1, -1, -1 )
186 IF( nb.LE.1 .OR. nb.GE.n )
THEN
190 CALL ztrti2( uplo, diag, n, a, lda, info )
200 jb = min( nb, n-j+1 )
204 CALL ztrmm(
'Left',
'Upper',
'No transpose', diag, j-1,
205 $ jb, one, a, lda, a( 1, j ), lda )
206 CALL ztrsm(
'Right',
'Upper',
'No transpose', diag, j-1,
207 $ jb, -one, a( j, j ), lda, a( 1, j ), lda )
211 CALL ztrti2(
'Upper', diag, jb, a( j, j ), lda, info )
217 nn = ( ( n-1 ) / nb )*nb + 1
219 jb = min( nb, n-j+1 )
224 CALL ztrmm(
'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 ztrsm(
'Right',
'Lower',
'No transpose', diag,
228 $ n-j-jb+1, jb, -one, a( j, j ), lda,
229 $ a( j+jb, j ), lda )
234 CALL ztrti2(
'Lower', diag, jb, a( j, j ), lda, info )
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine ztrmm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
ZTRMM
subroutine ztrtri(UPLO, DIAG, N, A, LDA, INFO)
ZTRTRI
subroutine ztrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
ZTRSM
subroutine ztrti2(UPLO, DIAG, N, A, LDA, INFO)
ZTRTI2 computes the inverse of a triangular matrix (unblocked algorithm).