ssyr2k.f.html

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

HTML
351
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>ssyr2k.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="SSYR2K.1"></a><a href="ssyr2k.f.html#SSYR2K.1">SSYR2K</a>(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
<span class="comment">*</span><span class="comment">     .. Scalar Arguments ..
</span>      REAL ALPHA,BETA
      INTEGER K,LDA,LDB,LDC,N
      CHARACTER TRANS,UPLO
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      REAL A(LDA,*),B(LDB,*),C(LDC,*)
<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="SSYR2K.14"></a><a href="ssyr2k.f.html#SSYR2K.1">SSYR2K</a>  performs one of the symmetric rank 2k operations
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     C := alpha*A*B' + alpha*B*A' + beta*C,
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  or
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     C := alpha*A'*B + alpha*B'*A + beta*C,
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  where  alpha and beta  are scalars, C is an  n by n  symmetric matrix
</span><span class="comment">*</span><span class="comment">  and  A and B  are  n by k  matrices  in the  first  case  and  k by n
</span><span class="comment">*</span><span class="comment">  matrices in the second case.
</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   - 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  array  C  is to be  referenced  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">              UPLO = 'U' or 'u'   Only the  upper triangular part of  C
</span><span class="comment">*</span><span class="comment">                                  is to be referenced.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              UPLO = 'L' or 'l'   Only the  lower triangular part of  C
</span><span class="comment">*</span><span class="comment">                                  is to be referenced.
</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">  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'   C := alpha*A*B' + alpha*B*A' +
</span><span class="comment">*</span><span class="comment">                                        beta*C.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              TRANS = 'T' or 't'   C := alpha*A'*B + alpha*B'*A +
</span><span class="comment">*</span><span class="comment">                                        beta*C.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              TRANS = 'C' or 'c'   C := alpha*A'*B + alpha*B'*A +
</span><span class="comment">*</span><span class="comment">                                        beta*C.
</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      - INTEGER.
</span><span class="comment">*</span><span class="comment">           On entry,  N specifies the order of the matrix C.  N must be
</span><span class="comment">*</span><span class="comment">           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">  K      - INTEGER.
</span><span class="comment">*</span><span class="comment">           On entry with  TRANS = 'N' or 'n',  K  specifies  the number
</span><span class="comment">*</span><span class="comment">           of  columns  of the  matrices  A and B,  and on  entry  with
</span><span class="comment">*</span><span class="comment">           TRANS = 'T' or 't' or 'C' or 'c',  K  specifies  the  number
</span><span class="comment">*</span><span class="comment">           of rows of the matrices  A and B.  K 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  - REAL            .
</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      - REAL             array of DIMENSION ( LDA, ka ), where ka is
</span><span class="comment">*</span><span class="comment">           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
</span><span class="comment">*</span><span class="comment">           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
</span><span class="comment">*</span><span class="comment">           part of the array  A  must contain the matrix  A,  otherwise
</span><span class="comment">*</span><span class="comment">           the leading  k by n  part of the array  A  must contain  the
</span><span class="comment">*</span><span class="comment">           matrix A.
</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.   When  TRANS = 'N' or 'n'
</span><span class="comment">*</span><span class="comment">           then  LDA must be at least  max( 1, n ), otherwise  LDA must
</span><span class="comment">*</span><span class="comment">           be at least  max( 1, k ).
</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">  B      - REAL             array of DIMENSION ( LDB, kb ), where kb is
</span><span class="comment">*</span><span class="comment">           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
</span><span class="comment">*</span><span class="comment">           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
</span><span class="comment">*</span><span class="comment">           part of the array  B  must contain the matrix  B,  otherwise
</span><span class="comment">*</span><span class="comment">           the leading  k by n  part of the array  B  must contain  the
</span><span class="comment">*</span><span class="comment">           matrix B.
</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">  LDB    - INTEGER.
</span><span class="comment">*</span><span class="comment">           On entry, LDB specifies the first dimension of B as declared
</span><span class="comment">*</span><span class="comment">           in  the  calling  (sub)  program.   When  TRANS = 'N' or 'n'
</span><span class="comment">*</span><span class="comment">           then  LDB must be at least  max( 1, n ), otherwise  LDB must
</span><span class="comment">*</span><span class="comment">           be at least  max( 1, k ).
</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   - REAL            .
</span><span class="comment">*</span><span class="comment">           On entry, BETA specifies the scalar beta.
</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">  C      - REAL             array of DIMENSION ( LDC, n ).
</span><span class="comment">*</span><span class="comment">           Before entry  with  UPLO = 'U' or 'u',  the leading  n by n
</span><span class="comment">*</span><span class="comment">           upper triangular part of the array C must contain the upper
</span><span class="comment">*</span><span class="comment">           triangular part  of the  symmetric matrix  and the strictly
</span><span class="comment">*</span><span class="comment">           lower triangular part of C is not referenced.  On exit, the
</span><span class="comment">*</span><span class="comment">           upper triangular part of the array  C is overwritten by the
</span><span class="comment">*</span><span class="comment">           upper triangular part of the updated matrix.
</span><span class="comment">*</span><span class="comment">           Before entry  with  UPLO = 'L' or 'l',  the leading  n by n
</span><span class="comment">*</span><span class="comment">           lower triangular part of the array C must contain the lower
</span><span class="comment">*</span><span class="comment">           triangular part  of the  symmetric matrix  and the strictly
</span><span class="comment">*</span><span class="comment">           upper triangular part of C is not referenced.  On exit, the
</span><span class="comment">*</span><span class="comment">           lower triangular part of the array  C is overwritten by the
</span><span class="comment">*</span><span class="comment">           lower triangular part of the updated matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDC    - INTEGER.
</span><span class="comment">*</span><span class="comment">           On entry, LDC specifies the first dimension of C as declared
</span><span class="comment">*</span><span class="comment">           in  the  calling  (sub)  program.   LDC  must  be  at  least
</span><span class="comment">*</span><span class="comment">           max( 1, n ).
</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 3 Blas routine.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  -- Written on 8-February-1989.
</span><span class="comment">*</span><span class="comment">     Jack Dongarra, Argonne National Laboratory.
</span><span class="comment">*</span><span class="comment">     Iain Duff, AERE Harwell.
</span><span class="comment">*</span><span class="comment">     Jeremy Du Croz, Numerical Algorithms Group Ltd.
</span><span class="comment">*</span><span class="comment">     Sven Hammarling, Numerical Algorithms Group Ltd.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. External Functions ..
</span>      LOGICAL <a name="LSAME.139"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
      EXTERNAL <a name="LSAME.140"></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.143"></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 MAX
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span>      REAL TEMP1,TEMP2
      INTEGER I,INFO,J,L,NROWA
      LOGICAL UPPER
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Parameters ..
</span>      REAL ONE,ZERO
      PARAMETER (ONE=1.0E+0,ZERO=0.0E+0)
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">

⌨️ 快捷键说明

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