109 SUBROUTINE cgetf2( M, N, A, LDA, IPIV, INFO )
117 INTEGER info, lda, m, n
128 parameter( one = ( 1.0e+0, 0.0e+0 ),
129 $ zero = ( 0.0e+0, 0.0e+0 ) )
153 ELSE IF( n.LT.0 )
THEN
155 ELSE IF( lda.LT.max( 1, m ) )
THEN
159 CALL
xerbla(
'CGETF2', -info )
165 IF( m.EQ.0 .OR. n.EQ.0 )
172 DO 10 j = 1, min( m, n )
176 jp = j - 1 +
icamax( m-j+1, a( j, j ), 1 )
178 IF( a( jp, j ).NE.zero )
THEN
183 $ CALL
cswap( n, a( j, 1 ), lda, a( jp, 1 ), lda )
188 IF( abs(a( j, j )) .GE. sfmin )
THEN
189 CALL
cscal( 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
cgeru( m-j, n-j, -one, a( j+1, j ), 1, a( j, j+1 ),
207 $ lda, a( j+1, j+1 ), lda )