150 SUBROUTINE ctzrzf( M, N, A, LDA, TAU, WORK, LWORK, INFO )
157 INTEGER INFO, LDA, LWORK, M, N
160 COMPLEX A( LDA, * ), TAU( * ), WORK( * )
167 parameter( zero = ( 0.0e+0, 0.0e+0 ) )
171 INTEGER I, IB, IWS, KI, KK, LDWORK, LWKMIN, LWKOPT,
172 $ M1, MU, NB, NBMIN, NX
183 EXTERNAL ilaenv, sroundup_lwork
190 lquery = ( lwork.EQ.-1 )
193 ELSE IF( n.LT.m )
THEN
195 ELSE IF( lda.LT.max( 1, m ) )
THEN
200 IF( m.EQ.0 .OR. m.EQ.n )
THEN
207 nb = ilaenv( 1,
'CGERQF',
' ', m, n, -1, -1 )
211 work( 1 ) = sroundup_lwork(lwkopt)
213 IF( lwork.LT.lwkmin .AND. .NOT.lquery )
THEN
219 CALL xerbla(
'CTZRZF', -info )
221 ELSE IF( lquery )
THEN
229 ELSE IF( m.EQ.n )
THEN
239 IF( nb.GT.1 .AND. nb.LT.m )
THEN
243 nx = max( 0, ilaenv( 3,
'CGERQF',
' ', m, n, -1, -1 ) )
250 IF( lwork.LT.iws )
THEN
256 nbmin = max( 2, ilaenv( 2,
'CGERQF',
' ', m, n, -1,
262 IF( nb.GE.nbmin .AND. nb.LT.m .AND. nx.LT.m )
THEN
268 ki = ( ( m-nx-1 ) / nb )*nb
271 DO 20 i = m - kk + ki + 1, m - kk + 1, -nb
272 ib = min( m-i+1, nb )
277 CALL clatrz( ib, n-i+1, n-m, a( i, i ), lda, tau( i ),
284 CALL clarzt(
'Backward',
'Rowwise', n-m, ib, a( i, m1 ),
285 $ lda, tau( i ), work, ldwork )
289 CALL clarzb(
'Right',
'No transpose',
'Backward',
290 $
'Rowwise', i-1, n-i+1, ib, n-m, a( i, m1 ),
291 $ lda, work, ldwork, a( 1, i ), lda,
292 $ work( ib+1 ), ldwork )
303 $
CALL clatrz( mu, n, n-m, a, lda, tau, work )
305 work( 1 ) = sroundup_lwork(lwkopt)
subroutine xerbla(srname, info)
subroutine clarzb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, c, ldc, work, ldwork)
CLARZB applies a block reflector or its conjugate-transpose to a general matrix.
subroutine clarzt(direct, storev, n, k, v, ldv, tau, t, ldt)
CLARZT forms the triangular factor T of a block reflector H = I - vtvH.
subroutine clatrz(m, n, l, a, lda, tau, work)
CLATRZ factors an upper trapezoidal matrix by means of unitary transformations.
subroutine ctzrzf(m, n, a, lda, tau, work, lwork, info)
CTZRZF