138 SUBROUTINE zgerqf( 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, KI, KK, LDWORK, LWKOPT,
156 $ MU, NB, NBMIN, NU, NX
173 lquery = ( lwork.EQ.-1 )
176 ELSE IF( n.LT.0 )
THEN
178 ELSE IF( lda.LT.max( 1, m ) )
THEN
187 nb = ilaenv( 1,
'ZGERQF',
' ', m, n, -1, -1 )
192 IF ( .NOT.lquery )
THEN
193 IF( lwork.LE.0 .OR. ( n.GT.0 .AND. lwork.LT.max( 1, m ) ) )
199 CALL xerbla(
'ZGERQF', -info )
201 ELSE IF( lquery )
THEN
214 IF( nb.GT.1 .AND. nb.LT.k )
THEN
218 nx = max( 0, ilaenv( 3,
'ZGERQF',
' ', m, n, -1, -1 ) )
225 IF( lwork.LT.iws )
THEN
231 nbmin = max( 2, ilaenv( 2,
'ZGERQF',
' ', m, n, -1,
237 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
242 ki = ( ( k-nx-1 ) / nb )*nb
245 DO 10 i = k - kk + ki + 1, k - kk + 1, -nb
246 ib = min( k-i+1, nb )
251 CALL zgerq2( ib, n-k+i+ib-1, a( m-k+i, 1 ), lda, tau( i ),
253 IF( m-k+i.GT.1 )
THEN
258 CALL zlarft(
'Backward',
'Rowwise', n-k+i+ib-1, ib,
259 $ a( m-k+i, 1 ), lda, tau( i ), work, ldwork )
263 CALL zlarfb(
'Right',
'No transpose',
'Backward',
264 $
'Rowwise', m-k+i-1, n-k+i+ib-1, ib,
265 $ a( m-k+i, 1 ), lda, work, ldwork, a, lda,
266 $ work( ib+1 ), ldwork )
269 mu = m - k + i + nb - 1
270 nu = n - k + i + nb - 1
278 IF( mu.GT.0 .AND. nu.GT.0 )
279 $
CALL zgerq2( mu, nu, a, lda, tau, work, iinfo )
subroutine xerbla(srname, info)
subroutine zgerq2(m, n, a, lda, tau, work, info)
ZGERQ2 computes the RQ factorization of a general rectangular matrix using an unblocked algorithm.
subroutine zgerqf(m, n, a, lda, tau, work, lwork, info)
ZGERQF
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