107 SUBROUTINE zgetf2( M, N, A, LDA, IPIV, INFO )
114 INTEGER INFO, LDA, M, N
118 COMPLEX*16 A( LDA, * )
125 parameter( one = ( 1.0d+0, 0.0d+0 ),
126 $ zero = ( 0.0d+0, 0.0d+0 ) )
129 DOUBLE PRECISION SFMIN
133 DOUBLE PRECISION DLAMCH
135 EXTERNAL dlamch, izamax
150 ELSE IF( n.LT.0 )
THEN
152 ELSE IF( lda.LT.max( 1, m ) )
THEN
156 CALL xerbla(
'ZGETF2', -info )
162 IF( m.EQ.0 .OR. n.EQ.0 )
169 DO 10 j = 1, min( m, n )
173 jp = j - 1 + izamax( m-j+1, a( j, j ), 1 )
175 IF( a( jp, j ).NE.zero )
THEN
180 $
CALL zswap( n, a( j, 1 ), lda, a( jp, 1 ), lda )
185 $
CALL zrscl( m-j, a( j, j ), a( j+1, j ), 1 )
187 ELSE IF( info.EQ.0 )
THEN
192 IF( j.LT.min( m, n ) )
THEN
196 CALL zgeru( m-j, n-j, -one, a( j+1, j ), 1, a( j, j+1 ),
197 $ lda, a( j+1, j+1 ), lda )
subroutine xerbla(srname, info)
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 zswap(n, zx, incx, zy, incy)
ZSWAP
subroutine zrscl(n, a, x, incx)
ZDRSCL multiplies a vector by the reciprocal of a real scalar.