189 SUBROUTINE sormrz( 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 REAL 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
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,
'SORMRQ', side // trans, m, n,
282 IF( lwork.LT.max( 1, nw ) .AND. .NOT.lquery )
THEN
288 CALL
xerbla(
'SORMRZ', -info )
290 ELSE IF( lquery )
THEN
296 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
302 IF( nb.GT.1 .AND. nb.LT.k )
THEN
304 IF( lwork.LT.iws )
THEN
306 nbmin = max( 2,
ilaenv( 2,
'SORMRQ', side // trans, m, n, k,
313 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
317 CALL
sormr3( side, trans, m, n, k, l, a, lda, tau, c, ldc,
323 IF( ( left .AND. .NOT.notran ) .OR.
324 $ ( .NOT.left .AND. notran ) )
THEN
329 i1 = ( ( k-1 ) / nb )*nb + 1
351 ib = min( nb, k-i+1 )
356 CALL
slarzt(
'Backward',
'Rowwise', l, ib, a( i, ja ), lda,
375 CALL
slarzb( side, transt,
'Backward',
'Rowwise', mi, ni,
376 $ ib, l, a( i, ja ), lda, t, ldt, c( ic, jc ),
377 $ ldc, work, ldwork )