160 RECURSIVE SUBROUTINE clarft( DIRECT, STOREV, N, K, V, LDV,
169 CHARACTER direct, storev
170 INTEGER k, ldt, ldv, n
174 COMPLEX t( ldt, * ), tau( * ), v( ldv, * )
179 COMPLEX one, neg_one, zero
180 parameter(one=1.0e+0, zero = 0.0e+0, neg_one=-1.0e+0)
185 LOGICAL qr,lq,ql,dirf,colv
209 IF(n.EQ.0.OR.k.EQ.0)
THEN
215 IF(n.EQ.1.OR.k.EQ.1)
THEN
229 dirf =
lsame(direct,
'F')
230 colv =
lsame(storev,
'C')
238 lq = dirf.AND.(.NOT.colv)
242 ql = (.NOT.dirf).AND.colv
302 CALL clarft(direct, storev, n, l, v, ldv, tau, t, ldt)
306 CALL clarft(direct, storev, n-l, k-l, v(l+1, l+1), ldv,
307 $ tau(l+1), t(l+1, l+1), ldt)
314 t(j, l+i) = conjg(v(l+i, j))
320 CALL ctrmm(
'Right',
'Lower',
'No transpose',
'Unit', l,
321 $ k-l, one, v(l+1, l+1), ldv, t(1, l+1), ldt)
327 CALL cgemm(
'Conjugate',
'No transpose', l, k-l, n-k, one,
328 $ v(k+1, 1), ldv, v(k+1, l+1), ldv, one, t(1, l+1),
337 CALL ctrmm(
'Left',
'Upper',
'No transpose',
'Non-unit', l,
338 $ k-l, neg_one, t, ldt, t(1, l+1), ldt)
342 CALL ctrmm(
'Right',
'Upper',
'No transpose',
'Non-unit', l,
343 $ k-l, one, t(l+1, l+1), ldt, t(1, l+1), ldt)
397 CALL clarft(direct, storev, n, l, v, ldv, tau, t, ldt)
401 CALL clarft(direct, storev, n-l, k-l, v(l+1, l+1), ldv,
402 $ tau(l+1), t(l+1, l+1), ldt)
408 CALL clacpy(
'All', l, k-l, v(1, l+1), ldv, t(1, l+1), ldt)
412 CALL ctrmm(
'Right',
'Upper',
'Conjugate',
'Unit', l, k-l,
413 $ one, v(l+1, l+1), ldv, t(1, l+1), ldt)
419 CALL cgemm(
'No transpose',
'Conjugate', l, k-l, n-k, one,
420 $ v(1, k+1), ldv, v(l+1, k+1), ldv, one, t(1, l+1), ldt)
428 CALL ctrmm(
'Left',
'Upper',
'No transpose',
'Non-unit', l,
429 $ k-l, neg_one, t, ldt, t(1, l+1), ldt)
434 CALL ctrmm(
'Right',
'Upper',
'No transpose',
'Non-unit', l,
435 $ k-l, one, t(l+1,l+1), ldt, t(1, l+1), ldt)
488 CALL clarft(direct, storev, n-l, k-l, v, ldv, tau, t, ldt)
492 CALL clarft(direct, storev, n, l, v(1, k-l+1), ldv,
493 $ tau(k-l+1), t(k-l+1, k-l+1), ldt)
500 t(k-l+i, j) = conjg(v(n-k+j, k-l+i))
506 CALL ctrmm(
'Right',
'Upper',
'No transpose',
'Unit', l,
507 $ k-l, one, v(n-k+1, 1), ldv, t(k-l+1, 1), ldt)
513 CALL cgemm(
'Conjugate',
'No transpose', l, k-l, n-k, one,
514 $ v(1, k-l+1), ldv, v, ldv, one, t(k-l+1, 1),
523 CALL ctrmm(
'Left',
'Lower',
'No transpose',
'Non-unit', l,
524 $ k-l, neg_one, t(k-l+1, k-l+1), ldt,
529 CALL ctrmm(
'Right',
'Lower',
'No transpose',
'Non-unit', l,
530 $ k-l, one, t, ldt, t(k-l+1, 1), ldt)
585 CALL clarft(direct, storev, n-l, k-l, v, ldv, tau, t, ldt)
589 CALL clarft(direct, storev, n, l, v(k-l+1,1), ldv,
590 $ tau(k-l+1), t(k-l+1, k-l+1), ldt)
595 CALL clacpy(
'All', l, k-l, v(k-l+1, n-k+1), ldv,
601 CALL ctrmm(
'Right',
'Lower',
'Conjugate',
'Unit', l, k-l,
602 $ one, v(1, n-k+1), ldv, t(k-l+1,1), ldt)
608 CALL cgemm(
'No transpose',
'Conjugate', l, k-l, n-k, one,
609 $ v(k-l+1, 1), ldv, v, ldv, one, t(k-l+1, 1),
619 CALL ctrmm(
'Left',
'Lower',
'No tranpose',
'Non-unit', l,
620 $ k-l, neg_one, t(k-l+1, k-l+1), ldt,
626 CALL ctrmm(
'Right',
'Lower',
'No tranpose',
'Non-unit', l,
627 $ k-l, one, t, ldt, t(k-l+1, 1), ldt)