111 SUBROUTINE dgetri( N, A, LDA, IPIV, WORK, LWORK, INFO )
118 INTEGER INFO, LDA, LWORK, N
122 DOUBLE PRECISION A( LDA, * ), WORK( * )
128 DOUBLE PRECISION ZERO, ONE
129 parameter( zero = 0.0d+0, one = 1.0d+0 )
133 INTEGER I, IWS, J, JB, JJ, JP, LDWORK, LWKOPT, NB,
152 nb = ilaenv( 1,
'DGETRI',
' ', n, -1, -1, -1 )
153 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(
'DGETRI', -info )
167 ELSE IF( lquery )
THEN
179 CALL dtrtri(
'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,
'DGETRI',
' ', n, -1, -1,
198 IF( nb.LT.nbmin .OR. nb.GE.n )
THEN
207 work( i ) = a( i, j )
214 $
CALL dgemv(
'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 dgemm(
'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 dtrsm(
'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 dswap( n, a( 1, j ), 1, a( 1, jp ), 1 )
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
DGEMV
subroutine dgetri(n, a, lda, ipiv, work, lwork, info)
DGETRI
subroutine dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
DTRSM