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 ) )
138 EXTERNAL slamch, icamax
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 )
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine cscal(N, CA, CX, INCX)
CSCAL
subroutine cgetf2(M, N, A, LDA, IPIV, INFO)
CGETF2 computes the LU factorization of a general m-by-n matrix using partial pivoting with row inter...
subroutine cswap(N, CX, INCX, CY, INCY)
CSWAP
subroutine cgeru(M, N, ALPHA, X, INCX, Y, INCY, A, LDA)
CGERU