zspmv.f.html

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

HTML
289
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>zspmv.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="ZSPMV.1"></a><a href="zspmv.f.html#ZSPMV.1">ZSPMV</a>( UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY )
<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          UPLO
      INTEGER            INCX, INCY, N
      COMPLEX*16         ALPHA, BETA
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      COMPLEX*16         AP( * ), 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="ZSPMV.19"></a><a href="zspmv.f.html#ZSPMV.1">ZSPMV</a>  performs the matrix-vector operation
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     y := alpha*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 n element vectors and
</span><span class="comment">*</span><span class="comment">  A is an n by n symmetric matrix, supplied in packed form.
</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">  UPLO     (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">           On entry, UPLO specifies whether the upper or lower
</span><span class="comment">*</span><span class="comment">           triangular part of the matrix A is supplied in the packed
</span><span class="comment">*</span><span class="comment">           array AP as follows:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              UPLO = 'U' or 'u'   The upper triangular part of A is
</span><span class="comment">*</span><span class="comment">                                  supplied in AP.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              UPLO = 'L' or 'l'   The lower triangular part of A is
</span><span class="comment">*</span><span class="comment">                                  supplied in AP.
</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">  N        (input) INTEGER
</span><span class="comment">*</span><span class="comment">           On entry, N specifies the order 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    (input) 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">  AP       (input) COMPLEX*16 array, dimension at least
</span><span class="comment">*</span><span class="comment">           ( ( N*( N + 1 ) )/2 ).
</span><span class="comment">*</span><span class="comment">           Before entry, with UPLO = 'U' or 'u', the array AP must
</span><span class="comment">*</span><span class="comment">           contain the upper triangular part of the symmetric matrix
</span><span class="comment">*</span><span class="comment">           packed sequentially, column by column, so that AP( 1 )
</span><span class="comment">*</span><span class="comment">           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
</span><span class="comment">*</span><span class="comment">           and a( 2, 2 ) respectively, and so on.
</span><span class="comment">*</span><span class="comment">           Before entry, with UPLO = 'L' or 'l', the array AP must
</span><span class="comment">*</span><span class="comment">           contain the lower triangular part of the symmetric matrix
</span><span class="comment">*</span><span class="comment">           packed sequentially, column by column, so that AP( 1 )
</span><span class="comment">*</span><span class="comment">           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
</span><span class="comment">*</span><span class="comment">           and a( 3, 1 ) respectively, and so on.
</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        (input) COMPLEX*16 array, dimension at least
</span><span class="comment">*</span><span class="comment">           ( 1 + ( N - 1 )*abs( INCX ) ).
</span><span class="comment">*</span><span class="comment">           Before entry, the incremented array X must contain the N-
</span><span class="comment">*</span><span class="comment">           element 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     (input) 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     (input) 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        (input/output) COMPLEX*16 array, dimension at least
</span><span class="comment">*</span><span class="comment">           ( 1 + ( N - 1 )*abs( INCY ) ).
</span><span class="comment">*</span><span class="comment">           Before entry, the incremented array Y must contain the n
</span><span class="comment">*</span><span class="comment">           element vector y. On exit, Y is overwritten by the updated
</span><span class="comment">*</span><span class="comment">           vector y.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  INCY     (input) 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">
</span><span class="comment">*</span><span class="comment">     .. Parameters ..
</span>      COMPLEX*16         ONE
      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
      COMPLEX*16         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>      INTEGER            I, INFO, IX, IY, J, JX, JY, K, KK, KX, KY
      COMPLEX*16         TEMP1, TEMP2
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Functions ..
</span>      LOGICAL            <a name="LSAME.105"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
      EXTERNAL           <a name="LSAME.106"></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.109"></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">     .. Executable Statements ..
</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.116"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( UPLO, <span class="string">'U'</span> ) .AND. .NOT.<a name="LSAME.116"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( UPLO, <span class="string">'L'</span> ) ) THEN
         INFO = 1
      ELSE IF( N.LT.0 ) THEN
         INFO = 2
      ELSE IF( INCX.EQ.0 ) THEN
         INFO = 6
      ELSE IF( INCY.EQ.0 ) THEN
         INFO = 9
      END IF
      IF( INFO.NE.0 ) THEN
         CALL <a name="XERBLA.126"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>( <span class="string">'<a name="ZSPMV.126"></a><a href="zspmv.f.html#ZSPMV.1">ZSPMV</a> '</span>, INFO )

⌨️ 快捷键说明

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