110 SUBROUTINE cgetc2( N, A, LDA, IPIV, JPIV, INFO )
120 INTEGER IPIV( * ), JPIV( * )
128 parameter( zero = 0.0e+0, one = 1.0e+0 )
131 INTEGER I, IP, IPV, J, JP, JPV
132 REAL BIGNUM, EPS, SMIN, SMLNUM, XMAX
142 INTRINSIC abs, cmplx, max
156 smlnum = slamch(
'S' ) / eps
157 bignum = one / smlnum
164 IF( abs( a( 1, 1 ) ).LT.smlnum )
THEN
166 a( 1, 1 ) = cmplx( 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 cswap( n, a( ipv, 1 ), lda, a( i, 1 ), lda )
200 $
CALL cswap( n, a( 1, jpv ), 1, a( 1, i ), 1 )
205 IF( abs( a( i, i ) ).LT.smin )
THEN
207 a( i, i ) = cmplx( smin, zero )
210 a( j, i ) = a( j, i ) / a( i, i )
212 CALL cgeru( n-i, n-i, -cmplx( 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 ) = cmplx( smin, zero )
subroutine cgeru(m, n, alpha, x, incx, y, incy, a, lda)
CGERU
subroutine cgetc2(n, a, lda, ipiv, jpiv, info)
CGETC2 computes the LU factorization with complete pivoting of the general n-by-n matrix.
subroutine cswap(n, cx, incx, cy, incy)
CSWAP