zlarfb.f.html

来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 633 行 · 第 1/4 页

HTML
633
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>zlarfb.f</title>
 <meta name="generator" content="emacs 21.3.1; htmlfontify 0.20">
<style type="text/css"><!-- 
body { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default   { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default a { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.string   { color: rgb(188, 143, 143);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.string a { color: rgb(188, 143, 143);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.comment   { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.comment a { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
 --></style>

 </head>
  <body>

<pre>
      SUBROUTINE <a name="ZLARFB.1"></a><a href="zlarfb.f.html#ZLARFB.1">ZLARFB</a>( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
     $                   T, LDT, C, LDC, WORK, LDWORK )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  -- LAPACK auxiliary routine (version 3.1) --
</span><span class="comment">*</span><span class="comment">     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
</span><span class="comment">*</span><span class="comment">     November 2006
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Scalar Arguments ..
</span>      CHARACTER          DIRECT, SIDE, STOREV, TRANS
      INTEGER            K, LDC, LDT, LDV, LDWORK, M, N
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      COMPLEX*16         C( LDC, * ), T( LDT, * ), V( LDV, * ),
     $                   WORK( LDWORK, * )
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Purpose
</span><span class="comment">*</span><span class="comment">  =======
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  <a name="ZLARFB.20"></a><a href="zlarfb.f.html#ZLARFB.1">ZLARFB</a> applies a complex block reflector H or its transpose H' to a
</span><span class="comment">*</span><span class="comment">  complex M-by-N matrix C, from either the left or the right.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Arguments
</span><span class="comment">*</span><span class="comment">  =========
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  SIDE    (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          = 'L': apply H or H' from the Left
</span><span class="comment">*</span><span class="comment">          = 'R': apply H or H' from the Right
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  TRANS   (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          = 'N': apply H (No transpose)
</span><span class="comment">*</span><span class="comment">          = 'C': apply H' (Conjugate transpose)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  DIRECT  (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          Indicates how H is formed from a product of elementary
</span><span class="comment">*</span><span class="comment">          reflectors
</span><span class="comment">*</span><span class="comment">          = 'F': H = H(1) H(2) . . . H(k) (Forward)
</span><span class="comment">*</span><span class="comment">          = 'B': H = H(k) . . . H(2) H(1) (Backward)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  STOREV  (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          Indicates how the vectors which define the elementary
</span><span class="comment">*</span><span class="comment">          reflectors are stored:
</span><span class="comment">*</span><span class="comment">          = 'C': Columnwise
</span><span class="comment">*</span><span class="comment">          = 'R': Rowwise
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  M       (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of rows of the matrix C.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  N       (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of columns of the matrix C.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  K       (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The order of the matrix T (= the number of elementary
</span><span class="comment">*</span><span class="comment">          reflectors whose product defines the block reflector).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  V       (input) COMPLEX*16 array, dimension
</span><span class="comment">*</span><span class="comment">                                (LDV,K) if STOREV = 'C'
</span><span class="comment">*</span><span class="comment">                                (LDV,M) if STOREV = 'R' and SIDE = 'L'
</span><span class="comment">*</span><span class="comment">                                (LDV,N) if STOREV = 'R' and SIDE = 'R'
</span><span class="comment">*</span><span class="comment">          The matrix V. See further details.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDV     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array V.
</span><span class="comment">*</span><span class="comment">          If STOREV = 'C' and SIDE = 'L', LDV &gt;= max(1,M);
</span><span class="comment">*</span><span class="comment">          if STOREV = 'C' and SIDE = 'R', LDV &gt;= max(1,N);
</span><span class="comment">*</span><span class="comment">          if STOREV = 'R', LDV &gt;= K.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  T       (input) COMPLEX*16 array, dimension (LDT,K)
</span><span class="comment">*</span><span class="comment">          The triangular K-by-K matrix T in the representation of the
</span><span class="comment">*</span><span class="comment">          block reflector.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDT     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array T. LDT &gt;= K.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  C       (input/output) COMPLEX*16 array, dimension (LDC,N)
</span><span class="comment">*</span><span class="comment">          On entry, the M-by-N matrix C.
</span><span class="comment">*</span><span class="comment">          On exit, C is overwritten by H*C or H'*C or C*H or C*H'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDC     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array C. LDC &gt;= max(1,M).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  WORK    (workspace) COMPLEX*16 array, dimension (LDWORK,K)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDWORK  (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array WORK.
</span><span class="comment">*</span><span class="comment">          If SIDE = 'L', LDWORK &gt;= max(1,N);
</span><span class="comment">*</span><span class="comment">          if SIDE = 'R', LDWORK &gt;= max(1,M).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  =====================================================================
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Parameters ..
</span>      COMPLEX*16         ONE
      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span>      CHARACTER          TRANST
      INTEGER            I, J
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Functions ..
</span>      LOGICAL            <a name="LSAME.100"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
      EXTERNAL           <a name="LSAME.101"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Subroutines ..
</span>      EXTERNAL           ZCOPY, ZGEMM, <a name="ZLACGV.104"></a><a href="zlacgv.f.html#ZLACGV.1">ZLACGV</a>, ZTRMM
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Intrinsic Functions ..
</span>      INTRINSIC          DCONJG
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Executable Statements ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Quick return if possible
</span><span class="comment">*</span><span class="comment">
</span>      IF( M.LE.0 .OR. N.LE.0 )
     $   RETURN
<span class="comment">*</span><span class="comment">
</span>      IF( <a name="LSAME.116"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( TRANS, <span class="string">'N'</span> ) ) THEN
         TRANST = <span class="string">'C'</span>
      ELSE
         TRANST = <span class="string">'N'</span>
      END IF
<span class="comment">*</span><span class="comment">
</span>      IF( <a name="LSAME.122"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( STOREV, <span class="string">'C'</span> ) ) THEN
<span class="comment">*</span><span class="comment">
</span>         IF( <a name="LSAME.124"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( DIRECT, <span class="string">'F'</span> ) ) THEN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">           Let  V =  ( V1 )    (first K rows)
</span><span class="comment">*</span><span class="comment">                     ( V2 )
</span><span class="comment">*</span><span class="comment">           where  V1  is unit lower triangular.
</span><span class="comment">*</span><span class="comment">
</span>            IF( <a name="LSAME.130"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( SIDE, <span class="string">'L'</span> ) ) THEN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              Form  H * C  or  H' * C  where  C = ( C1 )
</span><span class="comment">*</span><span class="comment">                                                  ( C2 )
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              W := C' * V  =  (C1'*V1 + C2'*V2)  (stored in WORK)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              W := C1'
</span><span class="comment">*</span><span class="comment">
</span>               DO 10 J = 1, K
                  CALL ZCOPY( N, C( J, 1 ), LDC, WORK( 1, J ), 1 )

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?