137 SUBROUTINE zgeqrf( M, N, A, LDA, TAU, WORK, LWORK, INFO )
145 INTEGER INFO, LDA, LWORK, M, N
148 COMPLEX*16 A( lda, * ), TAU( * ), WORK( * )
155 INTEGER I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB,
173 nb = ilaenv( 1,
'ZGEQRF',
' ', m, n, -1, -1 )
176 lquery = ( lwork.EQ.-1 )
179 ELSE IF( n.LT.0 )
THEN
181 ELSE IF( lda.LT.max( 1, m ) )
THEN
183 ELSE IF( lwork.LT.max( 1, n ) .AND. .NOT.lquery )
THEN
187 CALL xerbla(
'ZGEQRF', -info )
189 ELSE IF( lquery )
THEN
204 IF( nb.GT.1 .AND. nb.LT.k )
THEN
208 nx = max( 0, ilaenv( 3,
'ZGEQRF',
' ', m, n, -1, -1 ) )
215 IF( lwork.LT.iws )
THEN
221 nbmin = max( 2, ilaenv( 2,
'ZGEQRF',
' ', m, n, -1,
227 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
231 DO 10 i = 1, k - nx, nb
232 ib = min( k-i+1, nb )
237 CALL zgeqr2( m-i+1, ib, a( i, i ), lda, tau( i ), work,
244 CALL zlarft(
'Forward',
'Columnwise', m-i+1, ib,
245 $ a( i, i ), lda, tau( i ), work, ldwork )
249 CALL zlarfb(
'Left',
'Conjugate transpose',
'Forward',
250 $
'Columnwise', m-i+1, n-i-ib+1, ib,
251 $ a( i, i ), lda, work, ldwork, a( i, i+ib ),
252 $ lda, work( ib+1 ), ldwork )
262 $
CALL zgeqr2( m-i+1, n-i+1, a( i, i ), lda, tau( i ), work,
subroutine zlarft(DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT)
ZLARFT forms the triangular factor T of a block reflector H = I - vtvH
subroutine zgeqrf(M, N, A, LDA, TAU, WORK, LWORK, INFO)
ZGEQRF VARIANT: left-looking Level 3 BLAS of the algorithm.
subroutine zgeqr2(M, N, A, LDA, TAU, WORK, INFO)
ZGEQR2 computes the QR factorization of a general rectangular matrix using an unblocked algorithm...
subroutine xerbla(SRNAME, INFO)
XERBLA
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...