112 SUBROUTINE cgetc2( N, A, LDA, IPIV, JPIV, INFO )
123 INTEGER IPIV( * ), JPIV( * )
131 parameter ( zero = 0.0e+0, one = 1.0e+0 )
134 INTEGER I, IP, IPV, J, JP, JPV
135 REAL BIGNUM, EPS, SMIN, SMLNUM, XMAX
145 INTRINSIC abs, cmplx, max
159 smlnum = slamch(
'S' ) / eps
160 bignum = one / smlnum
161 CALL slabad( smlnum, bignum )
168 IF( abs( a( 1, 1 ) ).LT.smlnum )
THEN
170 a( 1, 1 ) = cmplx( smlnum, zero )
185 IF( abs( a( ip, jp ) ).GE.xmax )
THEN
186 xmax = abs( a( ip, jp ) )
193 $ smin = max( eps*xmax, smlnum )
198 $
CALL cswap( n, a( ipv, 1 ), lda, a( i, 1 ), lda )
204 $
CALL cswap( n, a( 1, jpv ), 1, a( 1, i ), 1 )
209 IF( abs( a( i, i ) ).LT.smin )
THEN
211 a( i, i ) = cmplx( smin, zero )
214 a( j, i ) = a( j, i ) / a( i, i )
216 CALL cgeru( n-i, n-i, -cmplx( one ), a( i+1, i ), 1,
217 $ a( i, i+1 ), lda, a( i+1, i+1 ), lda )
220 IF( abs( a( n, n ) ).LT.smin )
THEN
222 a( n, n ) = cmplx( smin, zero )
subroutine cgetc2(N, A, LDA, IPIV, JPIV, INFO)
CGETC2 computes the LU factorization with complete pivoting of the general n-by-n matrix...
subroutine slabad(SMALL, LARGE)
SLABAD
subroutine cswap(N, CX, INCX, CY, INCY)
CSWAP
subroutine cgeru(M, N, ALPHA, X, INCX, Y, INCY, A, LDA)
CGERU