112 RECURSIVE SUBROUTINE cgetrf2( M, N, A, LDA, IPIV, INFO )
119 INTEGER info, lda, m, n
130 parameter( one = ( 1.0e+0, 0.0e+0 ),
131 $ zero = ( 0.0e+0, 0.0e+0 ) )
136 INTEGER i, iinfo, n1, n2
156 ELSE IF( n.LT.0 )
THEN
158 ELSE IF( lda.LT.max( 1, m ) )
THEN
162 CALL xerbla(
'CGETRF2', -info )
168 IF( m.EQ.0 .OR. n.EQ.0 )
177 IF ( a(1,1).EQ.zero )
180 ELSE IF( n.EQ.1 )
THEN
191 i =
icamax( m, a( 1, 1 ), 1 )
193 IF( a( i, 1 ).NE.zero )
THEN
199 a( 1, 1 ) = a( i, 1 )
205 IF( abs(a( 1, 1 )) .GE. sfmin )
THEN
206 CALL cscal( m-1, one / a( 1, 1 ), a( 2, 1 ), 1 )
209 a( 1+i, 1 ) = a( 1+i, 1 ) / a( 1, 1 )
228 CALL cgetrf2( m, n1, a, lda, ipiv, iinfo )
230 IF ( info.EQ.0 .AND. iinfo.GT.0 )
237 CALL claswp( n2, a( 1, n1+1 ), lda, 1, n1, ipiv, 1 )
241 CALL ctrsm(
'L',
'L',
'N',
'U', n1, n2, one, a, lda,
242 $ a( 1, n1+1 ), lda )
246 CALL cgemm(
'N',
'N', m-n1, n2, n1, -one, a( n1+1, 1 ), lda,
247 $ a( 1, n1+1 ), lda, one, a( n1+1, n1+1 ), lda )
251 CALL cgetrf2( m-n1, n2, a( n1+1, n1+1 ), lda, ipiv( n1+1 ),
256 IF ( info.EQ.0 .AND. iinfo.GT.0 )
258 DO 20 i = n1+1, min( m, n )
259 ipiv( i ) = ipiv( i ) + n1
264 CALL claswp( n1, a( 1, 1 ), lda, n1+1, min( m, n), ipiv, 1 )
subroutine xerbla(srname, info)
subroutine cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
CGEMM
recursive subroutine cgetrf2(m, n, a, lda, ipiv, info)
CGETRF2
integer function icamax(n, cx, incx)
ICAMAX
real function slamch(cmach)
SLAMCH
subroutine claswp(n, a, lda, k1, k2, ipiv, incx)
CLASWP performs a series of row interchanges on a general rectangular matrix.
subroutine cscal(n, ca, cx, incx)
CSCAL
subroutine ctrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
CTRSM