195 SUBROUTINE zlarfb( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
196 $ T, LDT, C, LDC, WORK, LDWORK )
203 CHARACTER DIRECT, SIDE, STOREV, TRANS
204 INTEGER K, LDC, LDT, LDV, LDWORK, M, N
207 COMPLEX*16 C( LDC, * ), T( LDT, * ), V( LDV, * ),
215 parameter( one = ( 1.0d+0, 0.0d+0 ) )
235 IF( m.LE.0 .OR. n.LE.0 )
238 IF( lsame( trans,
'N' ) )
THEN
244 IF( lsame( storev,
'C' ) )
THEN
246 IF( lsame( direct,
'F' ) )
THEN
252 IF( lsame( side,
'L' ) )
THEN
262 CALL zcopy( n, c( j, 1 ), ldc, work( 1, j ), 1 )
263 CALL zlacgv( n, work( 1, j ), 1 )
268 CALL ztrmm(
'Right',
'Lower',
'No transpose',
'Unit', n,
269 $ k, one, v, ldv, work, ldwork )
274 CALL zgemm(
'Conjugate transpose',
'No transpose', n,
275 $ k, m-k, one, c( k+1, 1 ), ldc,
276 $ v( k+1, 1 ), ldv, one, work, ldwork )
281 CALL ztrmm(
'Right',
'Upper', transt,
'Non-unit', n, k,
282 $ one, t, ldt, work, ldwork )
290 CALL zgemm(
'No transpose',
'Conjugate transpose',
291 $ m-k, n, k, -one, v( k+1, 1 ), ldv, work,
292 $ ldwork, one, c( k+1, 1 ), ldc )
297 CALL ztrmm(
'Right',
'Lower',
'Conjugate transpose',
298 $
'Unit', n, k, one, v, ldv, work, ldwork )
304 c( j, i ) = c( j, i ) - dconjg( work( i, j ) )
308 ELSE IF( lsame( side,
'R' ) )
THEN
317 CALL zcopy( m, c( 1, j ), 1, work( 1, j ), 1 )
322 CALL ztrmm(
'Right',
'Lower',
'No transpose',
'Unit', m,
323 $ k, one, v, ldv, work, ldwork )
328 CALL zgemm(
'No transpose',
'No transpose', m, k, n-k,
329 $ one, c( 1, k+1 ), ldc, v( k+1, 1 ), ldv,
330 $ one, work, ldwork )
335 CALL ztrmm(
'Right',
'Upper', trans,
'Non-unit', m, k,
336 $ one, t, ldt, work, ldwork )
344 CALL zgemm(
'No transpose',
'Conjugate transpose', m,
345 $ n-k, k, -one, work, ldwork, v( k+1, 1 ),
346 $ ldv, one, c( 1, k+1 ), ldc )
351 CALL ztrmm(
'Right',
'Lower',
'Conjugate transpose',
352 $
'Unit', m, k, one, v, ldv, work, ldwork )
358 c( i, j ) = c( i, j ) - work( i, j )
369 IF( lsame( side,
'L' ) )
THEN
379 CALL zcopy( n, c( m-k+j, 1 ), ldc, work( 1, j ), 1 )
380 CALL zlacgv( n, work( 1, j ), 1 )
385 CALL ztrmm(
'Right',
'Upper',
'No transpose',
'Unit', n,
386 $ k, one, v( m-k+1, 1 ), ldv, work, ldwork )
391 CALL zgemm(
'Conjugate transpose',
'No transpose', n,
392 $ k, m-k, one, c, ldc, v, ldv, one, work,
398 CALL ztrmm(
'Right',
'Lower', transt,
'Non-unit', n, k,
399 $ one, t, ldt, work, ldwork )
407 CALL zgemm(
'No transpose',
'Conjugate transpose',
408 $ m-k, n, k, -one, v, ldv, work, ldwork,
414 CALL ztrmm(
'Right',
'Upper',
'Conjugate transpose',
415 $
'Unit', n, k, one, v( m-k+1, 1 ), ldv, work,
422 c( m-k+j, i ) = c( m-k+j, i ) -
423 $ dconjg( work( i, j ) )
427 ELSE IF( lsame( side,
'R' ) )
THEN
436 CALL zcopy( m, c( 1, n-k+j ), 1, work( 1, j ), 1 )
441 CALL ztrmm(
'Right',
'Upper',
'No transpose',
'Unit', m,
442 $ k, one, v( n-k+1, 1 ), ldv, work, ldwork )
447 CALL zgemm(
'No transpose',
'No transpose', m, k, n-k,
448 $ one, c, ldc, v, ldv, one, work, ldwork )
453 CALL ztrmm(
'Right',
'Lower', trans,
'Non-unit', m, k,
454 $ one, t, ldt, work, ldwork )
462 CALL zgemm(
'No transpose',
'Conjugate transpose', m,
463 $ n-k, k, -one, work, ldwork, v, ldv, one,
469 CALL ztrmm(
'Right',
'Upper',
'Conjugate transpose',
470 $
'Unit', m, k, one, v( n-k+1, 1 ), ldv, work,
477 c( i, n-k+j ) = c( i, n-k+j ) - work( i, j )
483 ELSE IF( lsame( storev,
'R' ) )
THEN
485 IF( lsame( direct,
'F' ) )
THEN
490 IF( lsame( side,
'L' ) )
THEN
500 CALL zcopy( n, c( j, 1 ), ldc, work( 1, j ), 1 )
501 CALL zlacgv( n, work( 1, j ), 1 )
506 CALL ztrmm(
'Right',
'Upper',
'Conjugate transpose',
507 $
'Unit', n, k, one, v, ldv, work, ldwork )
512 CALL zgemm(
'Conjugate transpose',
513 $
'Conjugate transpose', n, k, m-k, one,
514 $ c( k+1, 1 ), ldc, v( 1, k+1 ), ldv, one,
520 CALL ztrmm(
'Right',
'Upper', transt,
'Non-unit', n, k,
521 $ one, t, ldt, work, ldwork )
529 CALL zgemm(
'Conjugate transpose',
530 $
'Conjugate transpose', m-k, n, k, -one,
531 $ v( 1, k+1 ), ldv, work, ldwork, one,
537 CALL ztrmm(
'Right',
'Upper',
'No transpose',
'Unit', n,
538 $ k, one, v, ldv, work, ldwork )
544 c( j, i ) = c( j, i ) - dconjg( work( i, j ) )
548 ELSE IF( lsame( side,
'R' ) )
THEN
557 CALL zcopy( m, c( 1, j ), 1, work( 1, j ), 1 )
562 CALL ztrmm(
'Right',
'Upper',
'Conjugate transpose',
563 $
'Unit', m, k, one, v, ldv, work, ldwork )
568 CALL zgemm(
'No transpose',
'Conjugate transpose', m,
569 $ k, n-k, one, c( 1, k+1 ), ldc,
570 $ v( 1, k+1 ), ldv, one, work, ldwork )
575 CALL ztrmm(
'Right',
'Upper', trans,
'Non-unit', m, k,
576 $ one, t, ldt, work, ldwork )
584 CALL zgemm(
'No transpose',
'No transpose', m, n-k, k,
585 $ -one, work, ldwork, v( 1, k+1 ), ldv, one,
591 CALL ztrmm(
'Right',
'Upper',
'No transpose',
'Unit', m,
592 $ k, one, v, ldv, work, ldwork )
598 c( i, j ) = c( i, j ) - work( i, j )
609 IF( lsame( side,
'L' ) )
THEN
619 CALL zcopy( n, c( m-k+j, 1 ), ldc, work( 1, j ), 1 )
620 CALL zlacgv( n, work( 1, j ), 1 )
625 CALL ztrmm(
'Right',
'Lower',
'Conjugate transpose',
626 $
'Unit', n, k, one, v( 1, m-k+1 ), ldv, work,
632 CALL zgemm(
'Conjugate transpose',
633 $
'Conjugate transpose', n, k, m-k, one, c,
634 $ ldc, v, ldv, one, work, ldwork )
639 CALL ztrmm(
'Right',
'Lower', transt,
'Non-unit', n, k,
640 $ one, t, ldt, work, ldwork )
648 CALL zgemm(
'Conjugate transpose',
649 $
'Conjugate transpose', m-k, n, k, -one, v,
650 $ ldv, work, ldwork, one, c, ldc )
655 CALL ztrmm(
'Right',
'Lower',
'No transpose',
'Unit', n,
656 $ k, one, v( 1, m-k+1 ), ldv, work, ldwork )
662 c( m-k+j, i ) = c( m-k+j, i ) -
663 $ dconjg( work( i, j ) )
667 ELSE IF( lsame( side,
'R' ) )
THEN
676 CALL zcopy( m, c( 1, n-k+j ), 1, work( 1, j ), 1 )
681 CALL ztrmm(
'Right',
'Lower',
'Conjugate transpose',
682 $
'Unit', m, k, one, v( 1, n-k+1 ), ldv, work,
688 CALL zgemm(
'No transpose',
'Conjugate transpose', m,
689 $ k, n-k, one, c, ldc, v, ldv, one, work,
695 CALL ztrmm(
'Right',
'Lower', trans,
'Non-unit', m, k,
696 $ one, t, ldt, work, ldwork )
704 CALL zgemm(
'No transpose',
'No transpose', m, n-k, k,
705 $ -one, work, ldwork, v, ldv, one, c, ldc )
710 CALL ztrmm(
'Right',
'Lower',
'No transpose',
'Unit', m,
711 $ k, one, v( 1, n-k+1 ), ldv, work, ldwork )
717 c( i, n-k+j ) = c( i, n-k+j ) - work( i, j )
subroutine zcopy(n, zx, incx, zy, incy)
ZCOPY
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM
subroutine zlacgv(n, x, incx)
ZLACGV conjugates a complex vector.
subroutine zlarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
ZLARFB applies a block reflector or its conjugate-transpose to a general rectangular matrix.
subroutine ztrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
ZTRMM