145 SUBROUTINE zgeqrf( M, N, A, LDA, TAU, WORK, LWORK, INFO )
152 INTEGER INFO, LDA, LWORK, M, N
155 COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
162 INTEGER I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB,
181 nb = ilaenv( 1,
'ZGEQRF',
' ', m, n, -1, -1 )
182 lquery = ( lwork.EQ.-1 )
185 ELSE IF( n.LT.0 )
THEN
187 ELSE IF( lda.LT.max( 1, m ) )
THEN
189 ELSE IF( .NOT.lquery )
THEN
190 IF( lwork.LE.0 .OR. ( m.GT.0 .AND. lwork.LT.max( 1, n ) ) )
194 CALL xerbla(
'ZGEQRF', -info )
196 ELSE IF( lquery )
THEN
216 IF( nb.GT.1 .AND. nb.LT.k )
THEN
220 nx = max( 0, ilaenv( 3,
'ZGEQRF',
' ', m, n, -1, -1 ) )
227 IF( lwork.LT.iws )
THEN
233 nbmin = max( 2, ilaenv( 2,
'ZGEQRF',
' ', m, n, -1,
239 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
243 DO 10 i = 1, k - nx, nb
244 ib = min( k-i+1, nb )
249 CALL zgeqr2( m-i+1, ib, a( i, i ), lda, tau( i ), work,
256 CALL zlarft(
'Forward',
'Columnwise', m-i+1, ib,
257 $ a( i, i ), lda, tau( i ), work, ldwork )
261 CALL zlarfb(
'Left',
'Conjugate transpose',
'Forward',
262 $
'Columnwise', m-i+1, n-i-ib+1, ib,
263 $ a( i, i ), lda, work, ldwork, a( i, i+ib ),
264 $ lda, work( ib+1 ), ldwork )
274 $
CALL zgeqr2( m-i+1, n-i+1, a( i, i ), lda, tau( i ), work,
subroutine xerbla(srname, info)
subroutine zgeqr2(m, n, a, lda, tau, work, info)
ZGEQR2 computes the QR factorization of a general rectangular matrix using an unblocked algorithm.
subroutine zgeqrf(m, n, a, lda, tau, work, lwork, info)
ZGEQRF
subroutine zlarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
ZLARFB applies a block reflector or its conjugate-transpose to a general rectangular matrix.
subroutine zlarft(direct, storev, n, k, v, ldv, tau, t, ldt)
ZLARFT forms the triangular factor T of a block reflector H = I - vtvH