195 SUBROUTINE zlamswlq( 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*16 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,
'C' )
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(
'ZLAMSWLQ', -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 zgemlqt( 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 ztpmlqt(
'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 ztpmlqt(
'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 zgemlqt(
'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 zgemlqt(
'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 ztpmlqt(
'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 ztpmlqt(
'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 ztpmlqt(
'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 ztpmlqt(
'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 )
373 CALL zgemlqt(
'R',
'N',m , nb, k, mb, a(1,1), lda, t
374 $ ,ldt ,c(1,1), ldc, work, info )
376 ELSE IF (right.AND.tran)
THEN
380 kk = mod((n-k),(nb-k))
382 CALL zgemlqt(
'R',
'C',m , nb, k, mb, a(1,1), lda, t
383 $ ,ldt ,c(1,1), ldc, work, info )
386 DO i=nb+1,ii-nb+k,(nb-k)
390 CALL ztpmlqt(
'R',
'C',m , nb-k, k, 0,mb, a(1,i), lda,
391 $ t(1,ctr *k+1), ldt, c(1,1), ldc,
392 $ c(1,i), ldc, work, info )
400 CALL ztpmlqt(
'R',
'C',m , kk, k, 0,mb, a(1,ii), lda,
401 $ t(1, ctr * k + 1),ldt, c(1,1), ldc,
402 $ c(1,ii), ldc, work, info )
subroutine xerbla(srname, info)
subroutine zgemlqt(side, trans, m, n, k, mb, v, ldv, t, ldt, c, ldc, work, info)
ZGEMLQT
subroutine zlamswlq(side, trans, m, n, k, mb, nb, a, lda, t, ldt, c, ldc, work, lwork, info)
ZLAMSWLQ
subroutine ztpmlqt(side, trans, m, n, k, l, mb, v, ldv, t, ldt, a, lda, b, ldb, work, info)
ZTPMLQT