114 RECURSIVE SUBROUTINE zgetrf2( M, N, A, LDA, IPIV, INFO )
122 INTEGER INFO, LDA, M, N
126 COMPLEX*16 A( lda, * )
133 parameter ( one = ( 1.0d+0, 0.0d+0 ),
134 $ zero = ( 0.0d+0, 0.0d+0 ) )
137 DOUBLE PRECISION SFMIN
139 INTEGER I, IINFO, N1, N2
142 DOUBLE PRECISION DLAMCH
144 EXTERNAL dlamch, izamax
159 ELSE IF( n.LT.0 )
THEN
161 ELSE IF( lda.LT.max( 1, m ) )
THEN
165 CALL xerbla(
'ZGETRF2', -info )
171 IF( m.EQ.0 .OR. n.EQ.0 )
180 IF ( a(1,1).EQ.zero )
183 ELSE IF( n.EQ.1 )
THEN
194 i = izamax( m, a( 1, 1 ), 1 )
196 IF( a( i, 1 ).NE.zero )
THEN
202 a( 1, 1 ) = a( i, 1 )
208 IF( abs(a( 1, 1 )) .GE. sfmin )
THEN
209 CALL zscal( m-1, one / a( 1, 1 ), a( 2, 1 ), 1 )
212 a( 1+i, 1 ) = a( 1+i, 1 ) / a( 1, 1 )
231 CALL zgetrf2( m, n1, a, lda, ipiv, iinfo )
233 IF ( info.EQ.0 .AND. iinfo.GT.0 )
240 CALL zlaswp( n2, a( 1, n1+1 ), lda, 1, n1, ipiv, 1 )
244 CALL ztrsm(
'L',
'L',
'N',
'U', n1, n2, one, a, lda,
245 $ a( 1, n1+1 ), lda )
249 CALL zgemm(
'N',
'N', m-n1, n2, n1, -one, a( n1+1, 1 ), lda,
250 $ a( 1, n1+1 ), lda, one, a( n1+1, n1+1 ), lda )
254 CALL zgetrf2( m-n1, n2, a( n1+1, n1+1 ), lda, ipiv( n1+1 ),
259 IF ( info.EQ.0 .AND. iinfo.GT.0 )
261 DO 20 i = n1+1, min( m, n )
262 ipiv( i ) = ipiv( i ) + n1
267 CALL zlaswp( n1, a( 1, 1 ), lda, n1+1, min( m, n), ipiv, 1 )
subroutine zlaswp(N, A, LDA, K1, K2, IPIV, INCX)
ZLASWP performs a series of row interchanges on a general rectangular matrix.
subroutine zgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
ZGEMM
subroutine xerbla(SRNAME, INFO)
XERBLA
recursive subroutine zgetrf2(M, N, A, LDA, IPIV, INFO)
ZGETRF2
subroutine ztrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
ZTRSM
subroutine zscal(N, ZA, ZX, INCX)
ZSCAL