110 SUBROUTINE zgetc2( N, A, LDA, IPIV, JPIV, INFO )
120 INTEGER IPIV( * ), JPIV( * )
121 COMPLEX*16 A( LDA, * )
127 DOUBLE PRECISION ZERO, ONE
128 parameter( zero = 0.0d+0, one = 1.0d+0 )
131 INTEGER I, IP, IPV, J, JP, JPV
132 DOUBLE PRECISION BIGNUM, EPS, SMIN, SMLNUM, XMAX
138 DOUBLE PRECISION DLAMCH
142 INTRINSIC abs, dcmplx, max
156 smlnum = dlamch(
'S' ) / eps
157 bignum = one / smlnum
164 IF( abs( a( 1, 1 ) ).LT.smlnum )
THEN
166 a( 1, 1 ) = dcmplx( smlnum, zero )
181 IF( abs( a( ip, jp ) ).GE.xmax )
THEN
182 xmax = abs( a( ip, jp ) )
189 $ smin = max( eps*xmax, smlnum )
194 $
CALL zswap( n, a( ipv, 1 ), lda, a( i, 1 ), lda )
200 $
CALL zswap( n, a( 1, jpv ), 1, a( 1, i ), 1 )
205 IF( abs( a( i, i ) ).LT.smin )
THEN
207 a( i, i ) = dcmplx( smin, zero )
210 a( j, i ) = a( j, i ) / a( i, i )
212 CALL zgeru( n-i, n-i, -dcmplx( one ), a( i+1, i ), 1,
213 $ a( i, i+1 ), lda, a( i+1, i+1 ), lda )
216 IF( abs( a( n, n ) ).LT.smin )
THEN
218 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.
subroutine zswap(n, zx, incx, zy, incy)
ZSWAP