101 SUBROUTINE zgetrf ( M, N, A, LDA, IPIV, INFO)
109 INTEGER INFO, LDA, M, N
113 COMPLEX*16 A( lda, * )
120 parameter ( one = ( 1.0d+0, 0.0d+0 ) )
123 INTEGER I, IINFO, J, JB, NB
142 ELSE IF( n.LT.0 )
THEN
144 ELSE IF( lda.LT.max( 1, m ) )
THEN
148 CALL xerbla(
'ZGETRF', -info )
154 IF( m.EQ.0 .OR. n.EQ.0 )
159 nb = ilaenv( 1,
'ZGETRF',
' ', m, n, -1, -1 )
160 IF( nb.LE.1 .OR. nb.GE.min( m, n ) )
THEN
164 CALL zgetf2( m, n, a, lda, ipiv, info )
169 DO 20 j = 1, min( m, n ), nb
170 jb = min( min( m, n )-j+1, nb )
174 CALL zgemm(
'No transpose',
'No transpose',
175 $ m-j+1, jb, j-1, -one,
176 $ a( j, 1 ), lda, a( 1, j ), lda, one,
183 CALL zgetf2( m-j+1, jb, a( j, j ), lda, ipiv( j ), iinfo )
187 IF( info.EQ.0 .AND. iinfo.GT.0 )
188 $ info = iinfo + j - 1
189 DO 10 i = j, min( m, j+jb-1 )
190 ipiv( i ) = j - 1 + ipiv( i )
195 CALL zlaswp( j-1, a, lda, j, j+jb-1, ipiv, 1 )
197 IF ( j+jb.LE.n )
THEN
201 CALL zlaswp( n-j-jb+1, a( 1, j+jb ), lda, j, j+jb-1,
204 CALL zgemm(
'No transpose',
'No transpose',
205 $ jb, n-j-jb+1, j-1, -one,
206 $ a( j, 1 ), lda, a( 1, j+jb ), lda, one,
207 $ a( j, j+jb ), lda )
211 CALL ztrsm(
'Left',
'Lower',
'No transpose',
'Unit',
212 $ jb, n-j-jb+1, one, a( j, j ), lda,
213 $ a( j, j+jb ), lda )
subroutine zgetf2(M, N, A, LDA, IPIV, INFO)
ZGETF2 computes the LU factorization of a general m-by-n matrix using partial pivoting with row inter...
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 zgetrf(M, N, A, LDA, IPIV, INFO)
ZGETRF VARIANT: Crout Level 3 BLAS version of the algorithm.
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine ztrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
ZTRSM