111 SUBROUTINE zgetri( N, A, LDA, IPIV, WORK, LWORK, INFO )
118 INTEGER INFO, LDA, LWORK, N
122 COMPLEX*16 A( LDA, * ), WORK( * )
129 parameter( zero = ( 0.0d+0, 0.0d+0 ),
130 $ one = ( 1.0d+0, 0.0d+0 ) )
134 INTEGER I, IWS, J, JB, JJ, JP, LDWORK, LWKOPT, NB,
153 nb = ilaenv( 1,
'ZGETRI',
' ', n, -1, -1, -1 )
154 lwkopt = max( 1, n*nb )
156 lquery = ( lwork.EQ.-1 )
159 ELSE IF( lda.LT.max( 1, n ) )
THEN
161 ELSE IF( lwork.LT.max( 1, n ) .AND. .NOT.lquery )
THEN
165 CALL xerbla(
'ZGETRI', -info )
167 ELSE IF( lquery )
THEN
179 CALL ztrtri(
'Upper',
'Non-unit', n, a, lda, info )
185 IF( nb.GT.1 .AND. nb.LT.n )
THEN
186 iws = max( ldwork*nb, 1 )
187 IF( lwork.LT.iws )
THEN
189 nbmin = max( 2, ilaenv( 2,
'ZGETRI',
' ', n, -1, -1,
198 IF( nb.LT.nbmin .OR. nb.GE.n )
THEN
207 work( i ) = a( i, j )
214 $
CALL zgemv(
'No transpose', n, n-j, -one, a( 1, j+1 ),
215 $ lda, work( j+1 ), 1, one, a( 1, j ), 1 )
221 nn = ( ( n-1 ) / nb )*nb + 1
223 jb = min( nb, n-j+1 )
228 DO 40 jj = j, j + jb - 1
230 work( i+( jj-j )*ldwork ) = a( i, jj )
238 $
CALL zgemm(
'No transpose',
'No transpose', n, jb,
239 $ n-j-jb+1, -one, a( 1, j+jb ), lda,
240 $ work( j+jb ), ldwork, one, a( 1, j ), lda )
241 CALL ztrsm(
'Right',
'Lower',
'No transpose',
'Unit', n,
243 $ one, work( j ), ldwork, a( 1, j ), lda )
249 DO 60 j = n - 1, 1, -1
252 $
CALL zswap( n, a( 1, j ), 1, a( 1, jp ), 1 )
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM
subroutine zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
ZGEMV
subroutine zgetri(n, a, lda, ipiv, work, lwork, info)
ZGETRI
subroutine ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
ZTRSM