141 SUBROUTINE zgelqf( M, N, A, LDA, TAU, WORK, LWORK, INFO )
148 INTEGER INFO, LDA, LWORK, M, N
151 COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
158 INTEGER I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB,
177 nb = ilaenv( 1,
'ZGELQF',
' ', m, n, -1, -1 )
178 lquery = ( lwork.EQ.-1 )
181 ELSE IF( n.LT.0 )
THEN
183 ELSE IF( lda.LT.max( 1, m ) )
THEN
185 ELSE IF( .NOT.lquery )
THEN
186 IF( lwork.LE.0 .OR. ( n.GT.0 .AND. lwork.LT.max( 1, m ) ) )
190 CALL xerbla(
'ZGELQF', -info )
192 ELSE IF( lquery )
THEN
212 IF( nb.GT.1 .AND. nb.LT.k )
THEN
216 nx = max( 0, ilaenv( 3,
'ZGELQF',
' ', m, n, -1, -1 ) )
223 IF( lwork.LT.iws )
THEN
229 nbmin = max( 2, ilaenv( 2,
'ZGELQF',
' ', m, n, -1,
235 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
239 DO 10 i = 1, k - nx, nb
240 ib = min( k-i+1, nb )
245 CALL zgelq2( ib, n-i+1, a( i, i ), lda, tau( i ), work,
252 CALL zlarft(
'Forward',
'Rowwise', n-i+1, ib, a( i,
254 $ lda, tau( i ), work, ldwork )
258 CALL zlarfb(
'Right',
'No transpose',
'Forward',
259 $
'Rowwise', m-i-ib+1, n-i+1, ib, a( i, i ),
260 $ lda, work, ldwork, a( i+ib, i ), lda,
261 $ work( ib+1 ), ldwork )
271 $
CALL zgelq2( m-i+1, n-i+1, a( i, i ), lda, tau( i ), work,
subroutine zgelq2(m, n, a, lda, tau, work, info)
ZGELQ2 computes the LQ factorization of a general rectangular matrix using an unblocked algorithm.
subroutine zgelqf(m, n, a, lda, tau, work, lwork, info)
ZGELQF
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.
recursive subroutine zlarft(direct, storev, n, k, v, ldv, tau, t, ldt)
ZLARFT forms the triangular factor T of a block reflector H = I - vtvH