112 RECURSIVE SUBROUTINE dgetrf2( M, N, A, LDA, IPIV, INFO )
119 INTEGER info, lda, m, n
123 DOUBLE PRECISION a( lda, * )
129 DOUBLE PRECISION one, zero
130 parameter( one = 1.0d+0, zero = 0.0d+0 )
133 DOUBLE PRECISION sfmin, temp
134 INTEGER i, iinfo, n1, n2
154 ELSE IF( n.LT.0 )
THEN
156 ELSE IF( lda.LT.max( 1, m ) )
THEN
160 CALL xerbla(
'DGETRF2', -info )
166 IF( m.EQ.0 .OR. n.EQ.0 )
175 IF ( a(1,1).EQ.zero )
178 ELSE IF( n.EQ.1 )
THEN
189 i =
idamax( m, a( 1, 1 ), 1 )
191 IF( a( i, 1 ).NE.zero )
THEN
197 a( 1, 1 ) = a( i, 1 )
203 IF( abs(a( 1, 1 )) .GE. sfmin )
THEN
204 CALL dscal( m-1, one / a( 1, 1 ), a( 2, 1 ), 1 )
207 a( 1+i, 1 ) = a( 1+i, 1 ) / a( 1, 1 )
226 CALL dgetrf2( m, n1, a, lda, ipiv, iinfo )
228 IF ( info.EQ.0 .AND. iinfo.GT.0 )
235 CALL dlaswp( n2, a( 1, n1+1 ), lda, 1, n1, ipiv, 1 )
239 CALL dtrsm(
'L',
'L',
'N',
'U', n1, n2, one, a, lda,
240 $ a( 1, n1+1 ), lda )
244 CALL dgemm(
'N',
'N', m-n1, n2, n1, -one, a( n1+1, 1 ), lda,
245 $ a( 1, n1+1 ), lda, one, a( n1+1, n1+1 ), lda )
249 CALL dgetrf2( m-n1, n2, a( n1+1, n1+1 ), lda, ipiv( n1+1 ),
254 IF ( info.EQ.0 .AND. iinfo.GT.0 )
256 DO 20 i = n1+1, min( m, n )
257 ipiv( i ) = ipiv( i ) + n1
262 CALL dlaswp( n1, a( 1, 1 ), lda, n1+1, min( m, n), ipiv, 1 )
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dlaswp(n, a, lda, k1, k2, ipiv, incx)
DLASWP performs a series of row interchanges on a general rectangular matrix.
subroutine dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
DTRSM