195 SUBROUTINE slamswlq( 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 REAL A( LDA, * ), WORK( * ), C(LDC, * ),
215 LOGICAL LEFT, RIGHT, TRAN, NOTRAN, LQUERY
216 INTEGER I, II, KK, LW, CTR
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(
'SLAMSWLQ', -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 sgemlqt( 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))
292 CALL stpmlqt(
'L',
'T',kk , n, k, 0, mb, a(1,ii), lda,
293 $ t(1,ctr*k+1), ldt, c(1,1), ldc,
294 $ c(ii,1), ldc, work, info )
299 DO i=ii-(nb-k),nb+1,-(nb-k)
304 CALL stpmlqt(
'L',
'T',nb-k , n, k, 0,mb, a(1,i), lda,
305 $ t(1,ctr*k+1),ldt, c(1,1), ldc,
306 $ c(i,1), ldc, work, info )
311 CALL sgemlqt(
'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 sgemlqt(
'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 stpmlqt(
'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 stpmlqt(
'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 stpmlqt(
'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 stpmlqt(
'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 sgemlqt(
'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 sgemlqt(
'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 stpmlqt(
'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 stpmlqt(
'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 sgemlqt(side, trans, m, n, k, mb, v, ldv, t, ldt, c, ldc, work, info)
SGEMLQT
subroutine slamswlq(side, trans, m, n, k, mb, nb, a, lda, t, ldt, c, ldc, work, lwork, info)
SLAMSWLQ
subroutine stpmlqt(side, trans, m, n, k, l, mb, v, ldv, t, ldt, a, lda, b, ldb, work, info)
STPMLQT