          SEARCH  NEW RPMS  DIRECTORIES  ABOUT  FAQ  VARIOUS  BLOG  DONATE  YUM REPOSITORY    MAN page from OpenSuSE blas-man-3.4.2-3.6.16.noarch.rpm

# cherk.f

Section: LAPACK (3)
Updated: Thu Jun 23 2016
Index

cherk.f -

## SYNOPSIS

### Functions/Subroutines

subroutine CHERK (UPLO, TRANS, N, K, ALPHA, A, LDA, BETA, C, LDC)
CHERK

## Function/Subroutine Documentation

### subroutine CHERK (character UPLO, character TRANS, integer N, integer K, real ALPHA, complex, dimension(lda,*) A, integer LDA, real BETA, complex, dimension(ldc,*) C, integer LDC)

CHERK

Purpose:

` CHERK  performs one of the hermitian rank k operations    C := alpha*A*A**H + beta*C, or    C := alpha*A**H*A + beta*C, where  alpha and beta  are  real scalars,  C is an  n by n  hermitian matrix and  A  is an  n by k  matrix in the  first case and a  k by n matrix 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*A**H + beta*C.              TRANS = 'C' or 'c'   C := alpha*A**H*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   matrix   A,   and  on   entry   with           TRANS = 'C' or 'c',  K  specifies  the number of rows of the           matrix A.  K must be at least zero.`

ALPHA

`          ALPHA is REAL           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 ).`

BETA

`          BETA is REAL           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  hermitian 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  hermitian 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.           Note that the imaginary parts of the diagonal elements need           not be set,  they are assumed to be zero,  and on exit they           are set to zero.`

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

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.  -- Modified 8-Nov-93 to set C(J,J) to REAL( C(J,J) ) when BETA = 1.     Ed Anderson, Cray Research Inc.`

Definition at line 175 of file cherk.f.

`175 *176 *  -- Reference BLAS level3 routine (version 3.4.0) --177 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --178 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--179 *     November 2011180 *181 *     .. Scalar Arguments ..182       REAL alpha,beta183       INTEGER k,lda,ldc,n184       CHARACTER trans,uplo185 *     ..186 *     .. Array Arguments ..187       COMPLEX a(lda,*),c(ldc,*)188 *     ..189 *190 *  =====================================================================191 *192 *     .. External Functions ..193       LOGICAL lsame194       EXTERNAL lsame195 *     ..196 *     .. External Subroutines ..197       EXTERNAL xerbla198 *     ..199 *     .. Intrinsic Functions ..200       INTRINSIC cmplx,conjg,max,real201 *     ..202 *     .. Local Scalars ..203       COMPLEX temp204       REAL rtemp205       INTEGER i,info,j,l,nrowa206       LOGICAL upper207 *     ..208 *     .. Parameters ..209       REAL one,zero210       parameter(one=1.0e+0,zero=0.0e+0)211 *     ..212 *213 *     Test the input parameters.214 *215       IF (lsame(trans,'N')) THEN216           nrowa = n217       ELSE218           nrowa = k219       END IF220       upper = lsame(uplo,'U')221 *222       info = 0223       IF ((.NOT.upper) .AND. (.NOT.lsame(uplo,'L'))) THEN224           info = 1225       ELSE IF ((.NOT.lsame(trans,'N')) .AND.226      +         (.NOT.lsame(trans,'C'))) THEN227           info = 2228       ELSE IF (n.LT.0) THEN229           info = 3230       ELSE IF (k.LT.0) THEN231           info = 4232       ELSE IF (lda.LT.max(1,nrowa)) THEN233           info = 7234       ELSE IF (ldc.LT.max(1,n)) THEN235           info = 10236       END IF237       IF (info.NE.0) THEN238           CALL xerbla('CHERK ',info)239           RETURN240       END IF241 *242 *     Quick return if possible.243 *244       IF ((n.EQ.0) .OR. (((alpha.EQ.zero).OR.245      +    (k.EQ.0)).AND. (beta.EQ.one))) RETURN246 *247 *     And when  alpha.eq.zero.248 *249       IF (alpha.EQ.zero) THEN250           IF (upper) THEN251               IF (beta.EQ.zero) THEN252                   DO 20 j = 1,n253                       DO 10 i = 1,j254                           c(i,j) = zero255    10                 CONTINUE256    20             CONTINUE257               ELSE258                   DO 40 j = 1,n259                       DO 30 i = 1,j - 1260                           c(i,j) = beta*c(i,j)261    30                 CONTINUE262                       c(j,j) = beta*REAL(c(j,j))263    40             CONTINUE264               END IF265           ELSE266               IF (beta.EQ.zero) THEN267                   DO 60 j = 1,n268                       DO 50 i = j,n269                           c(i,j) = zero270    50                 CONTINUE271    60             CONTINUE272               ELSE273                   DO 80 j = 1,n274                       c(j,j) = beta*REAL(c(j,j))275                       DO 70 i = j + 1,n276                           c(i,j) = beta*c(i,j)277    70                 CONTINUE278    80             CONTINUE279               END IF280           END IF281           RETURN282       END IF283 *284 *     Start the operations.285 *286       IF (lsame(trans,'N')) THEN287 *288 *        Form  C := alpha*A*A**H + beta*C.289 *290           IF (upper) THEN291               DO 130 j = 1,n292                   IF (beta.EQ.zero) THEN293                       DO 90 i = 1,j294                           c(i,j) = zero295    90                 CONTINUE296                   ELSE IF (beta.NE.one) THEN297                       DO 100 i = 1,j - 1298                           c(i,j) = beta*c(i,j)299   100                 CONTINUE300                       c(j,j) = beta*REAL(c(j,j))301                   ELSE302                       c(j,j) = REAL(c(j,j))303                   END IF304                   DO 120 l = 1,k305                       IF (a(j,l).NE.cmplx(zero)) THEN306                           temp = alpha*conjg(a(j,l))307                           DO 110 i = 1,j - 1308                               c(i,j) = c(i,j) + temp*a(i,l)309   110                     CONTINUE310                           c(j,j) = REAL(C(J,J)) + REAL(temp*a(i,l))311                       END IF312   120             CONTINUE313   130         CONTINUE314           ELSE315               DO 180 j = 1,n316                   IF (beta.EQ.zero) THEN317                       DO 140 i = j,n318                           c(i,j) = zero319   140                 CONTINUE320                   ELSE IF (beta.NE.one) THEN321                       c(j,j) = beta*REAL(c(j,j))322                       DO 150 i = j + 1,n323                           c(i,j) = beta*c(i,j)324   150                 CONTINUE325                   ELSE326                       c(j,j) = REAL(c(j,j))327                   END IF328                   DO 170 l = 1,k329                       IF (a(j,l).NE.cmplx(zero)) THEN330                           temp = alpha*conjg(a(j,l))331                           c(j,j) = REAL(C(J,J)) + REAL(temp*a(j,l))332                           DO 160 i = j + 1,n333                               c(i,j) = c(i,j) + temp*a(i,l)334   160                     CONTINUE335                       END IF336   170             CONTINUE337   180         CONTINUE338           END IF339       ELSE340 *341 *        Form  C := alpha*A**H*A + beta*C.342 *343           IF (upper) THEN344               DO 220 j = 1,n345                   DO 200 i = 1,j - 1346                       temp = zero347                       DO 190 l = 1,k348                           temp = temp + conjg(a(l,i))*a(l,j)349   190                 CONTINUE350                       IF (beta.EQ.zero) THEN351                           c(i,j) = alpha*temp352                       ELSE353                           c(i,j) = alpha*temp + beta*c(i,j)354                       END IF355   200             CONTINUE356                   rtemp = zero357                   DO 210 l = 1,k358                       rtemp = rtemp + conjg(a(l,j))*a(l,j)359   210             CONTINUE360                   IF (beta.EQ.zero) THEN361                       c(j,j) = alpha*rtemp362                   ELSE363                       c(j,j) = alpha*rtemp + beta*REAL(c(j,j))364                   END IF365   220         CONTINUE366           ELSE367               DO 260 j = 1,n368                   rtemp = zero369                   DO 230 l = 1,k370                       rtemp = rtemp + conjg(a(l,j))*a(l,j)371   230             CONTINUE372                   IF (beta.EQ.zero) THEN373                       c(j,j) = alpha*rtemp374                   ELSE375                       c(j,j) = alpha*rtemp + beta*REAL(c(j,j))376                   END IF377                   DO 250 i = j + 1,n378                       temp = zero379                       DO 240 l = 1,k380                           temp = temp + conjg(a(l,i))*a(l,j)381   240                 CONTINUE382                       IF (beta.EQ.zero) THEN383                           c(i,j) = alpha*temp384                       ELSE385                           c(i,j) = alpha*temp + beta*c(i,j)386                       END IF387   250             CONTINUE388   260         CONTINUE389           END IF390       END IF391 *392       RETURN393 *394 *     End of CHERK .395 *`

## Author

Generated automatically by Doxygen for LAPACK from the source code.

## Index

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

This document was created byman2html,using the manual pages.  