105 SUBROUTINE zgetf2( M, N, A, LDA, IPIV, INFO )
112 INTEGER INFO, LDA, M, N
116 COMPLEX*16 A( LDA, * )
123 parameter( one = ( 1.0d+0, 0.0d+0 ),
124 $ zero = ( 0.0d+0, 0.0d+0 ) )
127 DOUBLE PRECISION SFMIN
131 DOUBLE PRECISION DLAMCH
133 EXTERNAL dlamch, izamax
148 ELSE IF( n.LT.0 )
THEN
150 ELSE IF( lda.LT.max( 1, m ) )
THEN
154 CALL xerbla(
'ZGETF2', -info )
160 IF( m.EQ.0 .OR. n.EQ.0 )
167 DO 10 j = 1, min( m, n )
171 jp = j - 1 + izamax( m-j+1, a( j, j ), 1 )
173 IF( a( jp, j ).NE.zero )
THEN
178 $
CALL zswap( n, a( j, 1 ), lda, a( jp, 1 ), lda )
183 $
CALL zrscl( m-j, a( j, j ), a( j+1, j ), 1 )
185 ELSE IF( info.EQ.0 )
THEN
190 IF( j.LT.min( m, n ) )
THEN
194 CALL zgeru( m-j, n-j, -one, a( j+1, j ), 1, a( j, j+1 ),
195 $ lda, a( j+1, j+1 ), lda )
subroutine zgeru(m, n, alpha, x, incx, y, incy, a, lda)
ZGERU
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 zrscl(n, a, x, incx)
ZDRSCL multiplies a vector by the reciprocal of a real scalar.