108 SUBROUTINE zgetc2( N, A, LDA, IPIV, JPIV, INFO )
118 INTEGER IPIV( * ), JPIV( * )
119 COMPLEX*16 A( LDA, * )
125 DOUBLE PRECISION ZERO, ONE
126 parameter( zero = 0.0d+0, one = 1.0d+0 )
129 INTEGER I, IP, IPV, J, JP, JPV
130 DOUBLE PRECISION BIGNUM, EPS, SMIN, SMLNUM, XMAX
136 DOUBLE PRECISION DLAMCH
140 INTRINSIC abs, dcmplx, max
154 smlnum = dlamch(
'S' ) / eps
155 bignum = one / smlnum
162 IF( abs( a( 1, 1 ) ).LT.smlnum )
THEN
164 a( 1, 1 ) = dcmplx( smlnum, zero )
179 IF( abs( a( ip, jp ) ).GE.xmax )
THEN
180 xmax = abs( a( ip, jp ) )
187 $ smin = max( eps*xmax, smlnum )
192 $
CALL zswap( n, a( ipv, 1 ), lda, a( i, 1 ), lda )
198 $
CALL zswap( n, a( 1, jpv ), 1, a( 1, i ), 1 )
203 IF( abs( a( i, i ) ).LT.smin )
THEN
205 a( i, i ) = dcmplx( smin, zero )
208 a( j, i ) = a( j, i ) / a( i, i )
210 CALL zgeru( n-i, n-i, -dcmplx( one ), a( i+1, i ), 1,
211 $ a( i, i+1 ), lda, a( i+1, i+1 ), lda )
214 IF( abs( a( n, n ) ).LT.smin )
THEN
216 a( n, n ) = dcmplx( smin, zero )
subroutine zgeru(m, n, alpha, x, incx, y, incy, a, lda)
ZGERU
subroutine zgetc2(n, a, lda, ipiv, jpiv, info)
ZGETC2 computes the LU factorization with complete pivoting of the general n-by-n matrix.