189 SUBROUTINE cunmrz( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
190 $ work, lwork, info )
198 CHARACTER side, trans
199 INTEGER info, k, l, lda, ldc, lwork, m, n
202 COMPLEX a( lda, * ), c( ldc, * ), tau( * ), work( * )
209 parameter( nbmax = 64, ldt = nbmax+1 )
212 LOGICAL left, lquery, notran
214 INTEGER i, i1, i2, i3, ib, ic, iinfo, iws, ja, jc,
215 $ ldwork, lwkopt, mi, nb, nbmin, ni, nq, nw
218 COMPLEX t( ldt, nbmax )
236 left =
lsame( side,
'L' )
237 notran =
lsame( trans,
'N' )
238 lquery = ( lwork.EQ.-1 )
249 IF( .NOT.left .AND. .NOT.
lsame( side,
'R' ) )
THEN
251 ELSE IF( .NOT.notran .AND. .NOT.
lsame( trans,
'C' ) )
THEN
253 ELSE IF( m.LT.0 )
THEN
255 ELSE IF( n.LT.0 )
THEN
257 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
259 ELSE IF( l.LT.0 .OR. ( left .AND. ( l.GT.m ) ) .OR.
260 $ ( .NOT.left .AND. ( l.GT.n ) ) )
THEN
262 ELSE IF( lda.LT.max( 1, k ) )
THEN
264 ELSE IF( ldc.LT.max( 1, m ) )
THEN
269 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
276 nb = min( nbmax,
ilaenv( 1,
'CUNMRQ', side // trans, m, n,
282 IF( lwork.LT.max( 1, nw ) .AND. .NOT.lquery )
THEN
288 CALL
xerbla(
'CUNMRZ', -info )
290 ELSE IF( lquery )
THEN
296 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
303 nb = min( nbmax,
ilaenv( 1,
'CUNMRQ', side // trans, m, n, k,
307 IF( nb.GT.1 .AND. nb.LT.k )
THEN
309 IF( lwork.LT.iws )
THEN
311 nbmin = max( 2,
ilaenv( 2,
'CUNMRQ', side // trans, m, n, k,
318 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
322 CALL
cunmr3( side, trans, m, n, k, l, a, lda, tau, c, ldc,
328 IF( ( left .AND. .NOT.notran ) .OR.
329 $ ( .NOT.left .AND. notran ) )
THEN
334 i1 = ( ( k-1 ) / nb )*nb + 1
356 ib = min( nb, k-i+1 )
361 CALL
clarzt(
'Backward',
'Rowwise', l, ib, a( i, ja ), lda,
380 CALL
clarzb( side, transt,
'Backward',
'Rowwise', mi, ni,
381 $ ib, l, a( i, ja ), lda, t, ldt, c( ic, jc ),
382 $ ldc, work, ldwork )