zgemv.f.html

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

HTML
306
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>zgemv.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="ZGEMV.1"></a><a href="zgemv.f.html#ZGEMV.1">ZGEMV</a>(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
<span class="comment">*</span><span class="comment">     .. Scalar Arguments ..
</span>      DOUBLE COMPLEX ALPHA,BETA
      INTEGER INCX,INCY,LDA,M,N
      CHARACTER TRANS
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      DOUBLE COMPLEX A(LDA,*),X(*),Y(*)
<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="ZGEMV.14"></a><a href="zgemv.f.html#ZGEMV.1">ZGEMV</a>  performs one of the matrix-vector operations
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     y := alpha*A*x + beta*y,   or   y := alpha*A'*x + beta*y,   or
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     y := alpha*conjg( A' )*x + beta*y,
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  where alpha and beta are scalars, x and y are vectors and A is an
</span><span class="comment">*</span><span class="comment">  m by n matrix.
</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">  TRANS  - CHARACTER*1.
</span><span class="comment">*</span><span class="comment">           On entry, TRANS specifies the operation to be performed as
</span><span class="comment">*</span><span class="comment">           follows:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              TRANS = 'N' or 'n'   y := alpha*A*x + beta*y.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              TRANS = 'T' or 't'   y := alpha*A'*x + beta*y.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              TRANS = 'C' or 'c'   y := alpha*conjg( A' )*x + beta*y.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  M      - INTEGER.
</span><span class="comment">*</span><span class="comment">           On entry, M specifies the number of rows of the matrix A.
</span><span class="comment">*</span><span class="comment">           M must be at least zero.
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  N      - INTEGER.
</span><span class="comment">*</span><span class="comment">           On entry, N specifies the number of columns of the matrix A.
</span><span class="comment">*</span><span class="comment">           N must be at least zero.
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  ALPHA  - COMPLEX*16      .
</span><span class="comment">*</span><span class="comment">           On entry, ALPHA specifies the scalar alpha.
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  A      - COMPLEX*16       array of DIMENSION ( LDA, n ).
</span><span class="comment">*</span><span class="comment">           Before entry, the leading m by n part of the array A must
</span><span class="comment">*</span><span class="comment">           contain the matrix of coefficients.
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDA    - INTEGER.
</span><span class="comment">*</span><span class="comment">           On entry, LDA specifies the first dimension of A as declared
</span><span class="comment">*</span><span class="comment">           in the calling (sub) program. LDA must be at least
</span><span class="comment">*</span><span class="comment">           max( 1, m ).
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  X      - COMPLEX*16       array of DIMENSION at least
</span><span class="comment">*</span><span class="comment">           ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
</span><span class="comment">*</span><span class="comment">           and at least
</span><span class="comment">*</span><span class="comment">           ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
</span><span class="comment">*</span><span class="comment">           Before entry, the incremented array X must contain the
</span><span class="comment">*</span><span class="comment">           vector x.
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  INCX   - INTEGER.
</span><span class="comment">*</span><span class="comment">           On entry, INCX specifies the increment for the elements of
</span><span class="comment">*</span><span class="comment">           X. INCX must not be zero.
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  BETA   - COMPLEX*16      .
</span><span class="comment">*</span><span class="comment">           On entry, BETA specifies the scalar beta. When BETA is
</span><span class="comment">*</span><span class="comment">           supplied as zero then Y need not be set on input.
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Y      - COMPLEX*16       array of DIMENSION at least
</span><span class="comment">*</span><span class="comment">           ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
</span><span class="comment">*</span><span class="comment">           and at least
</span><span class="comment">*</span><span class="comment">           ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
</span><span class="comment">*</span><span class="comment">           Before entry with BETA non-zero, the incremented array Y
</span><span class="comment">*</span><span class="comment">           must contain the vector y. On exit, Y is overwritten by the
</span><span class="comment">*</span><span class="comment">           updated vector y.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  INCY   - INTEGER.
</span><span class="comment">*</span><span class="comment">           On entry, INCY specifies the increment for the elements of
</span><span class="comment">*</span><span class="comment">           Y. INCY must not be zero.
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Level 2 Blas routine.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  -- Written on 22-October-1986.
</span><span class="comment">*</span><span class="comment">     Jack Dongarra, Argonne National Lab.
</span><span class="comment">*</span><span class="comment">     Jeremy Du Croz, Nag Central Office.
</span><span class="comment">*</span><span class="comment">     Sven Hammarling, Nag Central Office.
</span><span class="comment">*</span><span class="comment">     Richard Hanson, Sandia National Labs.
</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>      DOUBLE COMPLEX ONE
      PARAMETER (ONE= (1.0D+0,0.0D+0))
      DOUBLE COMPLEX ZERO
      PARAMETER (ZERO= (0.0D+0,0.0D+0))
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span>      DOUBLE COMPLEX TEMP
      INTEGER I,INFO,IX,IY,J,JX,JY,KX,KY,LENX,LENY
      LOGICAL NOCONJ
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Functions ..
</span>      LOGICAL <a name="LSAME.116"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
      EXTERNAL <a name="LSAME.117"></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 <a name="XERBLA.120"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Intrinsic Functions ..
</span>      INTRINSIC DCONJG,MAX
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Test the input parameters.
</span><span class="comment">*</span><span class="comment">
</span>      INFO = 0
      IF (.NOT.<a name="LSAME.129"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(TRANS,<span class="string">'N'</span>) .AND. .NOT.<a name="LSAME.129"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(TRANS,<span class="string">'T'</span>) .AND.
     +    .NOT.<a name="LSAME.130"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(TRANS,<span class="string">'C'</span>)) THEN
          INFO = 1
      ELSE IF (M.LT.0) THEN
          INFO = 2
      ELSE IF (N.LT.0) THEN

⌨️ 快捷键说明

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