113 SUBROUTINE dgetri( N, A, LDA, IPIV, WORK, LWORK, INFO )
120 INTEGER INFO, LDA, LWORK, N
124 DOUBLE PRECISION A( LDA, * ), WORK( * )
130 DOUBLE PRECISION ZERO, ONE
131 parameter( zero = 0.0d+0, one = 1.0d+0 )
135 INTEGER I, IWS, J, JB, JJ, JP, LDWORK, LWKOPT, NB,
153 nb = ilaenv( 1,
'DGETRI',
' ', n, -1, -1, -1 )
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, -1 ) )
197 IF( nb.LT.nbmin .OR. nb.GE.n )
THEN
206 work( i ) = a( i, j )
213 $
CALL dgemv(
'No transpose', n, n-j, -one, a( 1, j+1 ),
214 $ lda, work( j+1 ), 1, one, a( 1, j ), 1 )
220 nn = ( ( n-1 ) / nb )*nb + 1
222 jb = min( nb, n-j+1 )
227 DO 40 jj = j, j + jb - 1
229 work( i+( jj-j )*ldwork ) = a( i, jj )
237 $
CALL dgemm(
'No transpose',
'No transpose', n, jb,
238 $ n-j-jb+1, -one, a( 1, j+jb ), lda,
239 $ work( j+jb ), ldwork, one, a( 1, j ), lda )
240 CALL dtrsm(
'Right',
'Lower',
'No transpose',
'Unit', n, jb,
241 $ one, work( j ), ldwork, a( 1, j ), lda )
247 DO 60 j = n - 1, 1, -1
250 $
CALL dswap( n, a( 1, j ), 1, a( 1, jp ), 1 )
subroutine xerbla(srname, info)
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 dswap(n, dx, incx, dy, incy)
DSWAP
subroutine dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
DTRSM
subroutine dtrtri(uplo, diag, n, a, lda, info)
DTRTRI