          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

# cher2.f

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

cher2.f

## SYNOPSIS

### Functions/Subroutines

subroutine CHER2 (UPLO, N, ALPHA, X, INCX, Y, INCY, A, LDA)
CHER2

## Function/Subroutine Documentation

### subroutine CHER2 (character UPLO, integer N, complex ALPHA, complex, dimension(*) X, integer INCX, complex, dimension(*) Y, integer INCY, complex, dimension(lda,*) A, integer LDA)

CHER2

Purpose:

` CHER2  performs the hermitian rank 2 operation    A := alpha*x*y**H + conjg( alpha )*y*x**H + A, where alpha is a scalar, x and y are n element vectors and A is an n by n hermitian matrix.`

Parameters:

UPLO

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

N

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

ALPHA

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

X

`          X is COMPLEX array of dimension at least           ( 1 + ( n - 1 )*abs( INCX ) ).           Before entry, the incremented array X must contain the n           element vector x.`

INCX

`          INCX is INTEGER           On entry, INCX specifies the increment for the elements of           X. INCX must not be zero.`

Y

`          Y is COMPLEX array of dimension at least           ( 1 + ( n - 1 )*abs( INCY ) ).           Before entry, the incremented array Y must contain the n           element vector y.`

INCY

`          INCY is INTEGER           On entry, INCY specifies the increment for the elements of           Y. INCY must not be zero.`

A

`          A is COMPLEX array of DIMENSION ( LDA, n ).           Before entry with  UPLO = 'U' or 'u', the leading n by n           upper triangular part of the array A must contain the upper           triangular part of the hermitian matrix and the strictly           lower triangular part of A is not referenced. On exit, the           upper triangular part of the array A 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 A must contain the lower           triangular part of the hermitian matrix and the strictly           upper triangular part of A is not referenced. On exit, the           lower triangular part of the array A 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.`

LDA

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

Author:

Univ. of Tennessee

Univ. of California Berkeley

NAG Ltd.

Date:

November 2011

Further Details:

`  Level 2 Blas routine.  -- Written on 22-October-1986.     Jack Dongarra, Argonne National Lab.     Jeremy Du Croz, Nag Central Office.     Sven Hammarling, Nag Central Office.     Richard Hanson, Sandia National Labs.`

Definition at line 152 of file cher2.f.

`152 *153 *  -- Reference BLAS level2 routine (version 3.4.0) --154 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --155 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--156 *     November 2011157 *158 *     .. Scalar Arguments ..159       COMPLEX ALPHA160       INTEGER INCX,INCY,LDA,N161       CHARACTER UPLO162 *     ..163 *     .. Array Arguments ..164       COMPLEX A(LDA,*),X(*),Y(*)165 *     ..166 *167 *  =====================================================================168 *169 *     .. Parameters ..170       COMPLEX ZERO171       parameter(zero= (0.0e+0,0.0e+0))172 *     ..173 *     .. Local Scalars ..174       COMPLEX TEMP1,TEMP2175       INTEGER I,INFO,IX,IY,J,JX,JY,KX,KY176 *     ..177 *     .. External Functions ..178       LOGICAL LSAME179       EXTERNAL lsame180 *     ..181 *     .. External Subroutines ..182       EXTERNAL xerbla183 *     ..184 *     .. Intrinsic Functions ..185       INTRINSIC conjg,max,real186 *     ..187 *188 *     Test the input parameters.189 *190       info = 0191       IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN192           info = 1193       ELSE IF (n.LT.0) THEN194           info = 2195       ELSE IF (incx.EQ.0) THEN196           info = 5197       ELSE IF (incy.EQ.0) THEN198           info = 7199       ELSE IF (lda.LT.max(1,n)) THEN200           info = 9201       END IF202       IF (info.NE.0) THEN203           CALL xerbla('CHER2 ',info)204           RETURN205       END IF206 *207 *     Quick return if possible.208 *209       IF ((n.EQ.0) .OR. (alpha.EQ.zero)) RETURN210 *211 *     Set up the start points in X and Y if the increments are not both212 *     unity.213 *214       IF ((incx.NE.1) .OR. (incy.NE.1)) THEN215           IF (incx.GT.0) THEN216               kx = 1217           ELSE218               kx = 1 - (n-1)*incx219           END IF220           IF (incy.GT.0) THEN221               ky = 1222           ELSE223               ky = 1 - (n-1)*incy224           END IF225           jx = kx226           jy = ky227       END IF228 *229 *     Start the operations. In this version the elements of A are230 *     accessed sequentially with one pass through the triangular part231 *     of A.232 *233       IF (lsame(uplo,'U')) THEN234 *235 *        Form  A  when A is stored in the upper triangle.236 *237           IF ((incx.EQ.1) .AND. (incy.EQ.1)) THEN238               DO 20 j = 1,n239                   IF ((x(j).NE.zero) .OR. (y(j).NE.zero)) THEN240                       temp1 = alpha*conjg(y(j))241                       temp2 = conjg(alpha*x(j))242                       DO 10 i = 1,j - 1243                           a(i,j) = a(i,j) + x(i)*temp1 + y(i)*temp2244    10                 CONTINUE245                       a(j,j) = REAL(A(J,J)) +246      +                         REAL(X(J)*TEMP1+Y(J)*TEMP2)247                   ELSE248                       a(j,j) = REAL(A(J,J))249                   END IF250    20         CONTINUE251           ELSE252               DO 40 j = 1,n253                   IF ((x(jx).NE.zero) .OR. (y(jy).NE.zero)) THEN254                       temp1 = alpha*conjg(y(jy))255                       temp2 = conjg(alpha*x(jx))256                       ix = kx257                       iy = ky258                       DO 30 i = 1,j - 1259                           a(i,j) = a(i,j) + x(ix)*temp1 + y(iy)*temp2260                           ix = ix + incx261                           iy = iy + incy262    30                 CONTINUE263                       a(j,j) = REAL(A(J,J)) +264      +                         REAL(X(JX)*TEMP1+Y(JY)*TEMP2)265                   ELSE266                       a(j,j) = REAL(A(J,J))267                   END IF268                   jx = jx + incx269                   jy = jy + incy270    40         CONTINUE271           END IF272       ELSE273 *274 *        Form  A  when A is stored in the lower triangle.275 *276           IF ((incx.EQ.1) .AND. (incy.EQ.1)) THEN277               DO 60 j = 1,n278                   IF ((x(j).NE.zero) .OR. (y(j).NE.zero)) THEN279                       temp1 = alpha*conjg(y(j))280                       temp2 = conjg(alpha*x(j))281                       a(j,j) = REAL(A(J,J)) +282      +                         REAL(X(J)*TEMP1+Y(J)*TEMP2)283                       DO 50 i = j + 1,n284                           a(i,j) = a(i,j) + x(i)*temp1 + y(i)*temp2285    50                 CONTINUE286                   ELSE287                       a(j,j) = REAL(A(J,J))288                   END IF289    60         CONTINUE290           ELSE291               DO 80 j = 1,n292                   IF ((x(jx).NE.zero) .OR. (y(jy).NE.zero)) THEN293                       temp1 = alpha*conjg(y(jy))294                       temp2 = conjg(alpha*x(jx))295                       a(j,j) = REAL(A(J,J)) +296      +                         REAL(X(JX)*TEMP1+Y(JY)*TEMP2)297                       ix = jx298                       iy = jy299                       DO 70 i = j + 1,n300                           ix = ix + incx301                           iy = iy + incy302                           a(i,j) = a(i,j) + x(ix)*temp1 + y(iy)*temp2303    70                 CONTINUE304                   ELSE305                       a(j,j) = REAL(A(J,J))306                   END IF307                   jx = jx + incx308                   jy = jy + incy309    80         CONTINUE310           END IF311       END IF312 *313       RETURN314 *315 *     End of CHER2 .316 *`

## Author

Generated automatically by Doxygen for LAPACK from the source code.

## Index

NAME
SYNOPSIS
Functions/Subroutines
Function/Subroutine Documentation
subroutine CHER2 (character UPLO, integer N, complex ALPHA, complex, dimension(*) X, integer INCX, complex, dimension(*) Y, integer INCY, complex, dimension(lda,*) A, integer LDA)
Author

This document was created byman2html,using the manual pages.  