105 SUBROUTINE dgetf2( M, N, A, LDA, IPIV, INFO )
112 INTEGER INFO, LDA, M, N
116 DOUBLE PRECISION A( LDA, * )
122 DOUBLE PRECISION ONE, ZERO
123 parameter( one = 1.0d+0, zero = 0.0d+0 )
126 DOUBLE PRECISION SFMIN
130 DOUBLE PRECISION DLAMCH
132 EXTERNAL dlamch, idamax
147 ELSE IF( n.LT.0 )
THEN
149 ELSE IF( lda.LT.max( 1, m ) )
THEN
153 CALL xerbla(
'DGETF2', -info )
159 IF( m.EQ.0 .OR. n.EQ.0 )
166 DO 10 j = 1, min( m, n )
170 jp = j - 1 + idamax( m-j+1, a( j, j ), 1 )
172 IF( a( jp, j ).NE.zero )
THEN
177 $
CALL dswap( n, a( j, 1 ), lda, a( jp, 1 ), lda )
182 IF( abs(a( j, j )) .GE. sfmin )
THEN
183 CALL dscal( m-j, one / a( j, j ), a( j+1, j ), 1 )
186 a( j+i, j ) = a( j+i, j ) / a( j, j )
191 ELSE IF( info.EQ.0 )
THEN
196 IF( j.LT.min( m, n ) )
THEN
200 CALL dger( m-j, n-j, -one, a( j+1, j ), 1, a( j, j+1 ),
202 $ a( j+1, j+1 ), lda )
subroutine dger(m, n, alpha, x, incx, y, incy, a, lda)
DGER
subroutine dgetf2(m, n, a, lda, ipiv, info)
DGETF2 computes the LU factorization of a general m-by-n matrix using partial pivoting with row inter...