109 SUBROUTINE dgetf2( M, N, A, LDA, IPIV, INFO )
117 INTEGER INFO, LDA, M, N
121 DOUBLE PRECISION A( lda, * )
127 DOUBLE PRECISION ONE, ZERO
128 parameter ( one = 1.0d+0, zero = 0.0d+0 )
131 DOUBLE PRECISION SFMIN
135 DOUBLE PRECISION DLAMCH
137 EXTERNAL dlamch, idamax
152 ELSE IF( n.LT.0 )
THEN
154 ELSE IF( lda.LT.max( 1, m ) )
THEN
158 CALL xerbla(
'DGETF2', -info )
164 IF( m.EQ.0 .OR. n.EQ.0 )
171 DO 10 j = 1, min( m, n )
175 jp = j - 1 + idamax( m-j+1, a( j, j ), 1 )
177 IF( a( jp, j ).NE.zero )
THEN
182 $
CALL dswap( n, a( j, 1 ), lda, a( jp, 1 ), lda )
187 IF( abs(a( j, j )) .GE. sfmin )
THEN
188 CALL dscal( m-j, one / a( j, j ), a( j+1, j ), 1 )
191 a( j+i, j ) = a( j+i, j ) / a( j, j )
196 ELSE IF( info.EQ.0 )
THEN
201 IF( j.LT.min( m, n ) )
THEN
205 CALL dger( m-j, n-j, -one, a( j+1, j ), 1, a( j, j+1 ), lda,
206 $ a( j+1, j+1 ), lda )
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 xerbla(SRNAME, INFO)
XERBLA
subroutine dswap(N, DX, INCX, DY, INCY)
DSWAP
subroutine dger(M, N, ALPHA, X, INCX, Y, INCY, A, LDA)
DGER
subroutine dscal(N, DA, DX, INCX)
DSCAL