189 SUBROUTINE dormrz( 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 DOUBLE PRECISION 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 DOUBLE PRECISION 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,
'T' ) )
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,
'DORMRQ', side // trans, m, n,
282 IF( lwork.LT.max( 1, nw ) .AND. .NOT.lquery )
THEN
288 CALL
xerbla(
'DORMRZ', -info )
290 ELSE IF( lquery )
THEN
296 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
303 IF( nb.GT.1 .AND. nb.LT.k )
THEN
305 IF( lwork.LT.iws )
THEN
307 nbmin = max( 2,
ilaenv( 2,
'DORMRQ', side // trans, m, n, k,
314 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
318 CALL
dormr3( side, trans, m, n, k, l, a, lda, tau, c, ldc,
324 IF( ( left .AND. .NOT.notran ) .OR.
325 $ ( .NOT.left .AND. notran ) )
THEN
330 i1 = ( ( k-1 ) / nb )*nb + 1
352 ib = min( nb, k-i+1 )
357 CALL
dlarzt(
'Backward',
'Rowwise', l, ib, a( i, ja ), lda,
376 CALL
dlarzb( side, transt,
'Backward',
'Rowwise', mi, ni,
377 $ ib, l, a( i, ja ), lda, t, ldt, c( ic, jc ),
378 $ ldc, work, ldwork )