112 RECURSIVE SUBROUTINE zgetrf2( M, N, A, LDA, IPIV, INFO )
119 INTEGER info, lda, m, n
123 COMPLEX*16 a( lda, * )
130 parameter( one = ( 1.0d+0, 0.0d+0 ),
131 $ zero = ( 0.0d+0, 0.0d+0 ) )
134 DOUBLE PRECISION sfmin
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(
'ZGETRF2', -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 =
izamax( 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 zscal( m-1, one / a( 1, 1 ), a( 2, 1 ), 1 )
209 a( 1+i, 1 ) = a( 1+i, 1 ) / a( 1, 1 )
228 CALL zgetrf2( m, n1, a, lda, ipiv, iinfo )
230 IF ( info.EQ.0 .AND. iinfo.GT.0 )
237 CALL zlaswp( n2, a( 1, n1+1 ), lda, 1, n1, ipiv, 1 )
241 CALL ztrsm(
'L',
'L',
'N',
'U', n1, n2, one, a, lda,
242 $ a( 1, n1+1 ), lda )
246 CALL zgemm(
'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 zgetrf2( 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 zlaswp( n1, a( 1, 1 ), lda, n1+1, min( m, n), ipiv, 1 )
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM
subroutine zlaswp(n, a, lda, k1, k2, ipiv, incx)
ZLASWP performs a series of row interchanges on a general rectangular matrix.
subroutine ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
ZTRSM