109 SUBROUTINE zgetf2( M, N, A, LDA, IPIV, INFO )
117 INTEGER info, lda, m, n
121 COMPLEX*16 a( lda, * )
128 parameter( one = ( 1.0d+0, 0.0d+0 ),
129 $ zero = ( 0.0d+0, 0.0d+0 ) )
132 DOUBLE PRECISION sfmin
153 ELSE IF( n.LT.0 )
THEN
155 ELSE IF( lda.LT.max( 1, m ) )
THEN
159 CALL
xerbla(
'ZGETF2', -info )
165 IF( m.EQ.0 .OR. n.EQ.0 )
172 DO 10 j = 1, min( m, n )
176 jp = j - 1 +
izamax( m-j+1, a( j, j ), 1 )
178 IF( a( jp, j ).NE.zero )
THEN
183 $ CALL
zswap( n, a( j, 1 ), lda, a( jp, 1 ), lda )
188 IF( abs(a( j, j )) .GE. sfmin )
THEN
189 CALL
zscal( m-j, one / a( j, j ), a( j+1, j ), 1 )
192 a( j+i, j ) = a( j+i, j ) / a( j, j )
197 ELSE IF( info.EQ.0 )
THEN
202 IF( j.LT.min( m, n ) )
THEN
206 CALL
zgeru( m-j, n-j, -one, a( j+1, j ), 1, a( j, j+1 ),
207 $ lda, a( j+1, j+1 ), lda )