195 SUBROUTINE dlamswlq( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T,
196 $ LDT, C, LDC, WORK, LWORK, INFO )
203 CHARACTER SIDE, TRANS
204 INTEGER INFO, LDA, M, N, K, MB, NB, LDT, LWORK, LDC
207 DOUBLE PRECISION A( LDA, * ), WORK( * ), C(LDC, * ),
215 LOGICAL LEFT, RIGHT, TRAN, NOTRAN, LQUERY
216 INTEGER I, II, KK, CTR, LW
229 notran = lsame( trans,
'N' )
230 tran = lsame( trans,
'T' )
231 left = lsame( side,
'L' )
232 right = lsame( side,
'R' )
240 IF( .NOT.left .AND. .NOT.right )
THEN
242 ELSE IF( .NOT.tran .AND. .NOT.notran )
THEN
244 ELSE IF( k.LT.0 )
THEN
246 ELSE IF( m.LT.k )
THEN
248 ELSE IF( n.LT.0 )
THEN
250 ELSE IF( k.LT.mb .OR. mb.LT.1)
THEN
252 ELSE IF( lda.LT.max( 1, k ) )
THEN
254 ELSE IF( ldt.LT.max( 1, mb) )
THEN
256 ELSE IF( ldc.LT.max( 1, m ) )
THEN
258 ELSE IF(( lwork.LT.max(1,lw)).AND.(.NOT.lquery))
THEN
263 CALL xerbla(
'DLAMSWLQ', -info )
266 ELSE IF (lquery)
THEN
273 IF( min(m,n,k).EQ.0 )
THEN
277 IF((nb.LE.k).OR.(nb.GE.max(m,n,k)))
THEN
278 CALL dgemlqt( side, trans, m, n, k, mb, a, lda,
279 $ t, ldt, c, ldc, work, info)
283 IF(left.AND.tran)
THEN
287 kk = mod((m-k),(nb-k))
291 CALL dtpmlqt(
'L',
'T',kk , n, k, 0, mb, a(1,ii), lda,
292 $ t(1,ctr*k+1), ldt, c(1,1), ldc,
293 $ c(ii,1), ldc, work, info )
298 DO i=ii-(nb-k),nb+1,-(nb-k)
303 CALL dtpmlqt(
'L',
'T',nb-k , n, k, 0,mb, a(1,i), lda,
304 $ t(1, ctr*k+1),ldt, c(1,1), ldc,
305 $ c(i,1), ldc, work, info )
311 CALL dgemlqt(
'L',
'T',nb , n, k, mb, a(1,1), lda, t
312 $ ,ldt ,c(1,1), ldc, work, info )
314 ELSE IF (left.AND.notran)
THEN
318 kk = mod((m-k),(nb-k))
321 CALL dgemlqt(
'L',
'N',nb , n, k, mb, a(1,1), lda, t
322 $ ,ldt ,c(1,1), ldc, work, info )
324 DO i=nb+1,ii-nb+k,(nb-k)
328 CALL dtpmlqt(
'L',
'N',nb-k , n, k, 0,mb, a(1,i), lda,
329 $ t(1,ctr*k+1), ldt, c(1,1), ldc,
330 $ c(i,1), ldc, work, info )
338 CALL dtpmlqt(
'L',
'N',kk , n, k, 0, mb, a(1,ii), lda,
339 $ t(1,ctr*k+1), ldt, c(1,1), ldc,
340 $ c(ii,1), ldc, work, info )
344 ELSE IF(right.AND.notran)
THEN
348 kk = mod((n-k),(nb-k))
352 CALL dtpmlqt(
'R',
'N',m , kk, k, 0, mb, a(1, ii), lda,
353 $ t(1,ctr *k+1), ldt, c(1,1), ldc,
354 $ c(1,ii), ldc, work, info )
359 DO i=ii-(nb-k),nb+1,-(nb-k)
364 CALL dtpmlqt(
'R',
'N', m, nb-k, k, 0, mb, a(1, i), lda,
365 $ t(1,ctr*k+1), ldt, c(1,1), ldc,
366 $ c(1,i), ldc, work, info )
372 CALL dgemlqt(
'R',
'N',m , nb, k, mb, a(1,1), lda, t
373 $ ,ldt ,c(1,1), ldc, work, info )
375 ELSE IF (right.AND.tran)
THEN
379 kk = mod((n-k),(nb-k))
382 CALL dgemlqt(
'R',
'T',m , nb, k, mb, a(1,1), lda, t
383 $ ,ldt ,c(1,1), ldc, work, info )
385 DO i=nb+1,ii-nb+k,(nb-k)
389 CALL dtpmlqt(
'R',
'T',m , nb-k, k, 0,mb, a(1,i), lda,
390 $ t(1,ctr*k+1), ldt, c(1,1), ldc,
391 $ c(1,i), ldc, work, info )
399 CALL dtpmlqt(
'R',
'T',m , kk, k, 0,mb, a(1,ii), lda,
400 $ t(1,ctr*k+1),ldt, c(1,1), ldc,
401 $ c(1,ii), ldc, work, info )
subroutine xerbla(srname, info)
subroutine dgemlqt(side, trans, m, n, k, mb, v, ldv, t, ldt, c, ldc, work, info)
DGEMLQT
subroutine dlamswlq(side, trans, m, n, k, mb, nb, a, lda, t, ldt, c, ldc, work, lwork, info)
DLAMSWLQ
subroutine dtpmlqt(side, trans, m, n, k, l, mb, v, ldv, t, ldt, a, lda, b, ldb, work, info)
DTPMLQT