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
136 DOUBLE PRECISION DLAMCH
138 EXTERNAL dlamch, izamax
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 )
subroutine zgetf2(M, N, A, LDA, IPIV, INFO)
ZGETF2 computes the LU factorization of a general m-by-n matrix using partial pivoting with row inter...
subroutine zswap(N, ZX, INCX, ZY, INCY)
ZSWAP
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine zgeru(M, N, ALPHA, X, INCX, Y, INCY, A, LDA)
ZGERU
subroutine zscal(N, ZA, ZX, INCX)
ZSCAL