195 SUBROUTINE clamswlq( 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 COMPLEX A( LDA, * ), WORK( * ), C(LDC, * ),
215 LOGICAL LEFT, RIGHT, TRAN, NOTRAN, LQUERY
216 INTEGER I, II, KK, LW, CTR
221 EXTERNAL lsame, sroundup_lwork
230 notran = lsame( trans,
'N' )
231 tran = lsame( trans,
'C' )
232 left = lsame( side,
'L' )
233 right = lsame( side,
'R' )
241 IF( .NOT.left .AND. .NOT.right )
THEN
243 ELSE IF( .NOT.tran .AND. .NOT.notran )
THEN
245 ELSE IF( k.LT.0 )
THEN
247 ELSE IF( m.LT.k )
THEN
249 ELSE IF( n.LT.0 )
THEN
251 ELSE IF( k.LT.mb .OR. mb.LT.1)
THEN
253 ELSE IF( lda.LT.max( 1, k ) )
THEN
255 ELSE IF( ldt.LT.max( 1, mb) )
THEN
257 ELSE IF( ldc.LT.max( 1, m ) )
THEN
259 ELSE IF(( lwork.LT.max(1,lw)).AND.(.NOT.lquery))
THEN
264 CALL xerbla(
'CLAMSWLQ', -info )
265 work(1) = sroundup_lwork(lw)
267 ELSE IF (lquery)
THEN
268 work(1) = sroundup_lwork(lw)
274 IF( min(m,n,k).EQ.0 )
THEN
278 IF((nb.LE.k).OR.(nb.GE.max(m,n,k)))
THEN
279 CALL cgemlqt( side, trans, m, n, k, mb, a, lda,
280 $ t, ldt, c, ldc, work, info)
284 IF(left.AND.tran)
THEN
288 kk = mod((m-k),(nb-k))
292 CALL ctpmlqt(
'L',
'C',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 ctpmlqt(
'L',
'C',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 )
312 CALL cgemlqt(
'L',
'C',nb , n, k, mb, a(1,1), lda, t
313 $ ,ldt ,c(1,1), ldc, work, info )
315 ELSE IF (left.AND.notran)
THEN
319 kk = mod((m-k),(nb-k))
322 CALL cgemlqt(
'L',
'N',nb , n, k, mb, a(1,1), lda, t
323 $ ,ldt ,c(1,1), ldc, work, info )
325 DO i=nb+1,ii-nb+k,(nb-k)
329 CALL ctpmlqt(
'L',
'N',nb-k , n, k, 0,mb, a(1,i), lda,
330 $ t(1, ctr *k+1), ldt, c(1,1), ldc,
331 $ c(i,1), ldc, work, info )
339 CALL ctpmlqt(
'L',
'N',kk , n, k, 0, mb, a(1,ii), lda,
340 $ t(1, ctr*k+1), ldt, c(1,1), ldc,
341 $ c(ii,1), ldc, work, info )
345 ELSE IF(right.AND.notran)
THEN
349 kk = mod((n-k),(nb-k))
353 CALL ctpmlqt(
'R',
'N',m , kk, k, 0, mb, a(1, ii), lda,
354 $ t(1,ctr*k+1), ldt, c(1,1), ldc,
355 $ c(1,ii), ldc, work, info )
360 DO i=ii-(nb-k),nb+1,-(nb-k)
365 CALL ctpmlqt(
'R',
'N', m, nb-k, k, 0, mb, a(1, i), lda,
366 $ t(1,ctr*k+1), ldt, c(1,1), ldc,
367 $ c(1,i), ldc, work, info )
372 CALL cgemlqt(
'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 cgemlqt(
'R',
'C',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 ctpmlqt(
'R',
'C',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 ctpmlqt(
'R',
'C',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 )
407 work(1) = sroundup_lwork(lw)
subroutine xerbla(srname, info)
subroutine cgemlqt(side, trans, m, n, k, mb, v, ldv, t, ldt, c, ldc, work, info)
CGEMLQT
subroutine clamswlq(side, trans, m, n, k, mb, nb, a, lda, t, ldt, c, ldc, work, lwork, info)
CLAMSWLQ
subroutine ctpmlqt(side, trans, m, n, k, l, mb, v, ldv, t, ldt, a, lda, b, ldb, work, info)
CTPMLQT