107 SUBROUTINE dgetf2( M, N, A, LDA, IPIV, INFO )
114 INTEGER INFO, LDA, M, N
118 DOUBLE PRECISION A( LDA, * )
124 DOUBLE PRECISION ONE, ZERO
125 parameter( one = 1.0d+0, zero = 0.0d+0 )
128 DOUBLE PRECISION SFMIN
132 DOUBLE PRECISION DLAMCH
134 EXTERNAL dlamch, idamax
149 ELSE IF( n.LT.0 )
THEN
151 ELSE IF( lda.LT.max( 1, m ) )
THEN
155 CALL xerbla(
'DGETF2', -info )
161 IF( m.EQ.0 .OR. n.EQ.0 )
168 DO 10 j = 1, min( m, n )
172 jp = j - 1 + idamax( m-j+1, a( j, j ), 1 )
174 IF( a( jp, j ).NE.zero )
THEN
179 $
CALL dswap( n, a( j, 1 ), lda, a( jp, 1 ), lda )
184 IF( abs(a( j, j )) .GE. sfmin )
THEN
185 CALL dscal( m-j, one / a( j, j ), a( j+1, j ), 1 )
188 a( j+i, j ) = a( j+i, j ) / a( j, j )
193 ELSE IF( info.EQ.0 )
THEN
198 IF( j.LT.min( m, n ) )
THEN
202 CALL dger( m-j, n-j, -one, a( j+1, j ), 1, a( j, j+1 ), lda,
203 $ a( j+1, j+1 ), lda )
subroutine xerbla(srname, info)
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...
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine dswap(n, dx, incx, dy, incy)
DSWAP