152 SUBROUTINE ctzrzf( M, N, A, LDA, TAU, WORK, LWORK, INFO )
160 INTEGER info, lda, lwork, m, n
163 COMPLEX a( lda, * ), tau( * ), work( * )
170 parameter( zero = ( 0.0e+0, 0.0e+0 ) )
174 INTEGER i, ib, iws, ki, kk, ldwork, lwkmin, lwkopt,
175 $ m1, mu, nb, nbmin, nx
192 lquery = ( lwork.EQ.-1 )
195 ELSE IF( n.LT.m )
THEN
197 ELSE IF( lda.LT.max( 1, m ) )
THEN
202 IF( m.EQ.0 .OR. m.EQ.n )
THEN
209 nb =
ilaenv( 1,
'CGERQF',
' ', m, n, -1, -1 )
215 IF( lwork.LT.lwkmin .AND. .NOT.lquery )
THEN
221 CALL
xerbla(
'CTZRZF', -info )
223 ELSE IF( lquery )
THEN
231 ELSE IF( m.EQ.n )
THEN
241 IF( nb.GT.1 .AND. nb.LT.m )
THEN
245 nx = max( 0,
ilaenv( 3,
'CGERQF',
' ', m, n, -1, -1 ) )
252 IF( lwork.LT.iws )
THEN
258 nbmin = max( 2,
ilaenv( 2,
'CGERQF',
' ', m, n, -1,
264 IF( nb.GE.nbmin .AND. nb.LT.m .AND. nx.LT.m )
THEN
270 ki = ( ( m-nx-1 ) / nb )*nb
273 DO 20 i = m - kk + ki + 1, m - kk + 1, -nb
274 ib = min( m-i+1, nb )
279 CALL
clatrz( ib, n-i+1, n-m, a( i, i ), lda, tau( i ),
286 CALL
clarzt(
'Backward',
'Rowwise', n-m, ib, a( i, m1 ),
287 $ lda, tau( i ), work, ldwork )
291 CALL
clarzb(
'Right',
'No transpose',
'Backward',
292 $
'Rowwise', i-1, n-i+1, ib, n-m, a( i, m1 ),
293 $ lda, work, ldwork, a( 1, i ), lda,
294 $ work( ib+1 ), ldwork )
305 $ CALL
clatrz( mu, n, n-m, a, lda, tau, work )