SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from openSUSE Leap 15 blas-man-3.5.0-lp150.20.1.noarch.rpm

csyr2k.f

Section: LAPACK (3)
Updated: Thu Mar 29 2018
Index 

NAME

csyr2k.f 

SYNOPSIS


 

Functions/Subroutines


subroutine CSYR2K (UPLO, TRANS, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
CSYR2K  

Function/Subroutine Documentation

 

subroutine CSYR2K (character UPLO, character TRANS, integer N, integer K, complex ALPHA, complex, dimension(lda,*) A, integer LDA, complex, dimension(ldb,*) B, integer LDB, complex BETA, complex, dimension(ldc,*) C, integer LDC)

CSYR2K

Purpose:

 CSYR2K  performs one of the symmetric rank 2k operations    C := alpha*A*B**T + alpha*B*A**T + beta*C, or    C := alpha*A**T*B + alpha*B**T*A + beta*C, where  alpha and beta  are scalars,  C is an  n by n symmetric matrix and  A and B  are  n by k  matrices  in the  first  case  and  k by n matrices in the second case.


 

Parameters:

UPLO

          UPLO is CHARACTER*1           On  entry,   UPLO  specifies  whether  the  upper  or  lower           triangular  part  of the  array  C  is to be  referenced  as           follows:              UPLO = 'U' or 'u'   Only the  upper triangular part of  C                                  is to be referenced.              UPLO = 'L' or 'l'   Only the  lower triangular part of  C                                  is to be referenced.


TRANS

          TRANS is CHARACTER*1           On entry,  TRANS  specifies the operation to be performed as           follows:              TRANS = 'N' or 'n'    C := alpha*A*B**T + alpha*B*A**T +                                         beta*C.              TRANS = 'T' or 't'    C := alpha*A**T*B + alpha*B**T*A +                                         beta*C.


N

          N is INTEGER           On entry,  N specifies the order of the matrix C.  N must be           at least zero.


K

          K is INTEGER           On entry with  TRANS = 'N' or 'n',  K  specifies  the number           of  columns  of the  matrices  A and B,  and on  entry  with           TRANS = 'T' or 't',  K  specifies  the number of rows of the           matrices  A and B.  K must be at least zero.


ALPHA

          ALPHA is COMPLEX           On entry, ALPHA specifies the scalar alpha.


A

          A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k           part of the array  A  must contain the matrix  A,  otherwise           the leading  k by n  part of the array  A  must contain  the           matrix A.


LDA

          LDA is INTEGER           On entry, LDA specifies the first dimension of A as declared           in  the  calling  (sub)  program.   When  TRANS = 'N' or 'n'           then  LDA must be at least  max( 1, n ), otherwise  LDA must           be at least  max( 1, k ).


B

          B is COMPLEX array of DIMENSION ( LDB, kb ), where kb is           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k           part of the array  B  must contain the matrix  B,  otherwise           the leading  k by n  part of the array  B  must contain  the           matrix B.


LDB

          LDB is INTEGER           On entry, LDB specifies the first dimension of B as declared           in  the  calling  (sub)  program.   When  TRANS = 'N' or 'n'           then  LDB must be at least  max( 1, n ), otherwise  LDB must           be at least  max( 1, k ).


BETA

          BETA is COMPLEX           On entry, BETA specifies the scalar beta.


C

          C is COMPLEX array of DIMENSION ( LDC, n ).           Before entry  with  UPLO = 'U' or 'u',  the leading  n by n           upper triangular part of the array C must contain the upper           triangular part  of the  symmetric matrix  and the strictly           lower triangular part of C is not referenced.  On exit, the           upper triangular part of the array  C is overwritten by the           upper triangular part of the updated matrix.           Before entry  with  UPLO = 'L' or 'l',  the leading  n by n           lower triangular part of the array C must contain the lower           triangular part  of the  symmetric matrix  and the strictly           upper triangular part of C is not referenced.  On exit, the           lower triangular part of the array  C is overwritten by the           lower triangular part of the updated matrix.


LDC

          LDC is INTEGER           On entry, LDC specifies the first dimension of C as declared           in  the  calling  (sub)  program.   LDC  must  be  at  least           max( 1, n ).


 

Author:

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Date:

November 2011

Further Details:

  Level 3 Blas routine.  -- Written on 8-February-1989.     Jack Dongarra, Argonne National Laboratory.     Iain Duff, AERE Harwell.     Jeremy Du Croz, Numerical Algorithms Group Ltd.     Sven Hammarling, Numerical Algorithms Group Ltd.


 

Definition at line 190 of file csyr2k.f.

190 *191 *  -- Reference BLAS level3 routine (version 3.4.0) --192 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --193 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--194 *     November 2011195 *196 *     .. Scalar Arguments ..197       COMPLEX ALPHA,BETA198       INTEGER K,LDA,LDB,LDC,N199       CHARACTER TRANS,UPLO200 *     ..201 *     .. Array Arguments ..202       COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)203 *     ..204 *205 *  =====================================================================206 *207 *     .. External Functions ..208       LOGICAL LSAME209       EXTERNAL lsame210 *     ..211 *     .. External Subroutines ..212       EXTERNAL xerbla213 *     ..214 *     .. Intrinsic Functions ..215       INTRINSIC max216 *     ..217 *     .. Local Scalars ..218       COMPLEX TEMP1,TEMP2219       INTEGER I,INFO,J,L,NROWA220       LOGICAL UPPER221 *     ..222 *     .. Parameters ..223       COMPLEX ONE224       parameter(one= (1.0e+0,0.0e+0))225       COMPLEX ZERO226       parameter(zero= (0.0e+0,0.0e+0))227 *     ..228 *229 *     Test the input parameters.230 *231       IF (lsame(trans,'N')) THEN232           nrowa = n233       ELSE234           nrowa = k235       END IF236       upper = lsame(uplo,'U')237 *238       info = 0239       IF ((.NOT.upper) .AND. (.NOT.lsame(uplo,'L'))) THEN240           info = 1241       ELSE IF ((.NOT.lsame(trans,'N')) .AND.242      +         (.NOT.lsame(trans,'T'))) THEN243           info = 2244       ELSE IF (n.LT.0) THEN245           info = 3246       ELSE IF (k.LT.0) THEN247           info = 4248       ELSE IF (lda.LT.max(1,nrowa)) THEN249           info = 7250       ELSE IF (ldb.LT.max(1,nrowa)) THEN251           info = 9252       ELSE IF (ldc.LT.max(1,n)) THEN253           info = 12254       END IF255       IF (info.NE.0) THEN256           CALL xerbla('CSYR2K',info)257           RETURN258       END IF259 *260 *     Quick return if possible.261 *262       IF ((n.EQ.0) .OR. (((alpha.EQ.zero).OR.263      +    (k.EQ.0)).AND. (beta.EQ.one))) RETURN264 *265 *     And when  alpha.eq.zero.266 *267       IF (alpha.EQ.zero) THEN268           IF (upper) THEN269               IF (beta.EQ.zero) THEN270                   DO 20 j = 1,n271                       DO 10 i = 1,j272                           c(i,j) = zero273    10                 CONTINUE274    20             CONTINUE275               ELSE276                   DO 40 j = 1,n277                       DO 30 i = 1,j278                           c(i,j) = beta*c(i,j)279    30                 CONTINUE280    40             CONTINUE281               END IF282           ELSE283               IF (beta.EQ.zero) THEN284                   DO 60 j = 1,n285                       DO 50 i = j,n286                           c(i,j) = zero287    50                 CONTINUE288    60             CONTINUE289               ELSE290                   DO 80 j = 1,n291                       DO 70 i = j,n292                           c(i,j) = beta*c(i,j)293    70                 CONTINUE294    80             CONTINUE295               END IF296           END IF297           RETURN298       END IF299 *300 *     Start the operations.301 *302       IF (lsame(trans,'N')) THEN303 *304 *        Form  C := alpha*A*B**T + alpha*B*A**T + C.305 *306           IF (upper) THEN307               DO 130 j = 1,n308                   IF (beta.EQ.zero) THEN309                       DO 90 i = 1,j310                           c(i,j) = zero311    90                 CONTINUE312                   ELSE IF (beta.NE.one) THEN313                       DO 100 i = 1,j314                           c(i,j) = beta*c(i,j)315   100                 CONTINUE316                   END IF317                   DO 120 l = 1,k318                       IF ((a(j,l).NE.zero) .OR. (b(j,l).NE.zero)) THEN319                           temp1 = alpha*b(j,l)320                           temp2 = alpha*a(j,l)321                           DO 110 i = 1,j322                               c(i,j) = c(i,j) + a(i,l)*temp1 +323      +                                 b(i,l)*temp2324   110                     CONTINUE325                       END IF326   120             CONTINUE327   130         CONTINUE328           ELSE329               DO 180 j = 1,n330                   IF (beta.EQ.zero) THEN331                       DO 140 i = j,n332                           c(i,j) = zero333   140                 CONTINUE334                   ELSE IF (beta.NE.one) THEN335                       DO 150 i = j,n336                           c(i,j) = beta*c(i,j)337   150                 CONTINUE338                   END IF339                   DO 170 l = 1,k340                       IF ((a(j,l).NE.zero) .OR. (b(j,l).NE.zero)) THEN341                           temp1 = alpha*b(j,l)342                           temp2 = alpha*a(j,l)343                           DO 160 i = j,n344                               c(i,j) = c(i,j) + a(i,l)*temp1 +345      +                                 b(i,l)*temp2346   160                     CONTINUE347                       END IF348   170             CONTINUE349   180         CONTINUE350           END IF351       ELSE352 *353 *        Form  C := alpha*A**T*B + alpha*B**T*A + C.354 *355           IF (upper) THEN356               DO 210 j = 1,n357                   DO 200 i = 1,j358                       temp1 = zero359                       temp2 = zero360                       DO 190 l = 1,k361                           temp1 = temp1 + a(l,i)*b(l,j)362                           temp2 = temp2 + b(l,i)*a(l,j)363   190                 CONTINUE364                       IF (beta.EQ.zero) THEN365                           c(i,j) = alpha*temp1 + alpha*temp2366                       ELSE367                           c(i,j) = beta*c(i,j) + alpha*temp1 +368      +                             alpha*temp2369                       END IF370   200             CONTINUE371   210         CONTINUE372           ELSE373               DO 240 j = 1,n374                   DO 230 i = j,n375                       temp1 = zero376                       temp2 = zero377                       DO 220 l = 1,k378                           temp1 = temp1 + a(l,i)*b(l,j)379                           temp2 = temp2 + b(l,i)*a(l,j)380   220                 CONTINUE381                       IF (beta.EQ.zero) THEN382                           c(i,j) = alpha*temp1 + alpha*temp2383                       ELSE384                           c(i,j) = beta*c(i,j) + alpha*temp1 +385      +                             alpha*temp2386                       END IF387   230             CONTINUE388   240         CONTINUE389           END IF390       END IF391 *392       RETURN393 *394 *     End of CSYR2K.395 *
 

Author

Generated automatically by Doxygen for LAPACK from the source code.


 

Index

NAME
SYNOPSIS
Functions/Subroutines
Function/Subroutine Documentation
subroutine CSYR2K (character UPLO, character TRANS, integer N, integer K, complex ALPHA, complex, dimension(lda,*) A, integer LDA, complex, dimension(ldb,*) B, integer LDB, complex BETA, complex, dimension(ldc,*) C, integer LDC)
Author

This document was created byman2html,using the manual pages.