169 SUBROUTINE dormrq( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
170 $ work, lwork, info )
178 CHARACTER side, trans
179 INTEGER info, k, lda, ldc, lwork, m, n
182 DOUBLE PRECISION a( lda, * ), c( ldc, * ), tau( * ), work( * )
189 parameter( nbmax = 64, ldt = nbmax+1 )
192 LOGICAL left, lquery, notran
194 INTEGER i, i1, i2, i3, ib, iinfo, iws, ldwork, lwkopt,
195 $ mi, nb, nbmin, ni, nq, nw
198 DOUBLE PRECISION t( ldt, nbmax )
216 left =
lsame( side,
'L' )
217 notran =
lsame( trans,
'N' )
218 lquery = ( lwork.EQ.-1 )
229 IF( .NOT.left .AND. .NOT.
lsame( side,
'R' ) )
THEN
231 ELSE IF( .NOT.notran .AND. .NOT.
lsame( trans,
'T' ) )
THEN
233 ELSE IF( m.LT.0 )
THEN
235 ELSE IF( n.LT.0 )
THEN
237 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
239 ELSE IF( lda.LT.max( 1, k ) )
THEN
241 ELSE IF( ldc.LT.max( 1, m ) )
THEN
246 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
253 nb = min( nbmax,
ilaenv( 1,
'DORMRQ', side // trans, m, n,
259 IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
265 CALL
xerbla(
'DORMRQ', -info )
267 ELSE IF( lquery )
THEN
273 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
279 IF( nb.GT.1 .AND. nb.LT.k )
THEN
281 IF( lwork.LT.iws )
THEN
283 nbmin = max( 2,
ilaenv( 2,
'DORMRQ', side // trans, m, n, k,
290 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
294 CALL
dormr2( side, trans, m, n, k, a, lda, tau, c, ldc, work,
300 IF( ( left .AND. .NOT.notran ) .OR.
301 $ ( .NOT.left .AND. notran ) )
THEN
306 i1 = ( ( k-1 ) / nb )*nb + 1
324 ib = min( nb, k-i+1 )
329 CALL
dlarft(
'Backward',
'Rowwise', nq-k+i+ib-1, ib,
330 $ a( i, 1 ), lda, tau( i ), t, ldt )
335 mi = m - k + i + ib - 1
340 ni = n - k + i + ib - 1
345 CALL
dlarfb( side, transt,
'Backward',
'Rowwise', mi, ni,
346 $ ib, a( i, 1 ), lda, t, ldt, c, ldc, work,