SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from openSUSE Leap 42 blas-man-3.5.0-9.1.noarch.rpm

chpr2.f

Section: LAPACK (3)
Updated: Fri Nov 4 2016
Index 

NAME

chpr2.f -  

SYNOPSIS


 

Functions/Subroutines


subroutine CHPR2 (UPLO, N, ALPHA, X, INCX, Y, INCY, AP)
CHPR2  

Function/Subroutine Documentation

 

subroutine CHPR2 (character UPLO, integer N, complex ALPHA, complex, dimension(*) X, integer INCX, complex, dimension(*) Y, integer INCY, complex, dimension(*) AP)

CHPR2

Purpose:

 CHPR2  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, supplied in packed form.


 

Parameters:

UPLO

          UPLO is CHARACTER*1           On entry, UPLO specifies whether the upper or lower           triangular part of the matrix A is supplied in the packed           array AP as follows:              UPLO = 'U' or 'u'   The upper triangular part of A is                                  supplied in AP.              UPLO = 'L' or 'l'   The lower triangular part of A is                                  supplied in AP.


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.


AP

          AP is COMPLEX array of DIMENSION at least           ( ( n*( n + 1 ) )/2 ).           Before entry with  UPLO = 'U' or 'u', the array AP must           contain the upper triangular part of the hermitian matrix           packed sequentially, column by column, so that AP( 1 )           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )           and a( 2, 2 ) respectively, and so on. On exit, the array           AP is overwritten by the upper triangular part of the           updated matrix.           Before entry with UPLO = 'L' or 'l', the array AP must           contain the lower triangular part of the hermitian matrix           packed sequentially, column by column, so that AP( 1 )           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )           and a( 3, 1 ) respectively, and so on. On exit, the array           AP 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.


 

Author:

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

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 147 of file chpr2.f.

147 *148 *  -- Reference BLAS level2 routine (version 3.4.0) --149 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --150 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--151 *     November 2011152 *153 *     .. Scalar Arguments ..154       COMPLEX alpha155       INTEGER incx,incy,n156       CHARACTER uplo157 *     ..158 *     .. Array Arguments ..159       COMPLEX ap(*),x(*),y(*)160 *     ..161 *162 *  =====================================================================163 *164 *     .. Parameters ..165       COMPLEX zero166       parameter(zero= (0.0e+0,0.0e+0))167 *     ..168 *     .. Local Scalars ..169       COMPLEX temp1,temp2170       INTEGER i,info,ix,iy,j,jx,jy,k,kk,kx,ky171 *     ..172 *     .. External Functions ..173       LOGICAL lsame174       EXTERNAL lsame175 *     ..176 *     .. External Subroutines ..177       EXTERNAL xerbla178 *     ..179 *     .. Intrinsic Functions ..180       INTRINSIC conjg,real181 *     ..182 *183 *     Test the input parameters.184 *185       info = 0186       IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN187           info = 1188       ELSE IF (n.LT.0) THEN189           info = 2190       ELSE IF (incx.EQ.0) THEN191           info = 5192       ELSE IF (incy.EQ.0) THEN193           info = 7194       END IF195       IF (info.NE.0) THEN196           CALL xerbla('CHPR2 ',info)197           RETURN198       END IF199 *200 *     Quick return if possible.201 *202       IF ((n.EQ.0) .OR. (alpha.EQ.zero)) RETURN203 *204 *     Set up the start points in X and Y if the increments are not both205 *     unity.206 *207       IF ((incx.NE.1) .OR. (incy.NE.1)) THEN208           IF (incx.GT.0) THEN209               kx = 1210           ELSE211               kx = 1 - (n-1)*incx212           END IF213           IF (incy.GT.0) THEN214               ky = 1215           ELSE216               ky = 1 - (n-1)*incy217           END IF218           jx = kx219           jy = ky220       END IF221 *222 *     Start the operations. In this version the elements of the array AP223 *     are accessed sequentially with one pass through AP.224 *225       kk = 1226       IF (lsame(uplo,'U')) THEN227 *228 *        Form  A  when upper triangle is stored in AP.229 *230           IF ((incx.EQ.1) .AND. (incy.EQ.1)) THEN231               DO 20 j = 1,n232                   IF ((x(j).NE.zero) .OR. (y(j).NE.zero)) THEN233                       temp1 = alpha*conjg(y(j))234                       temp2 = conjg(alpha*x(j))235                       k = kk236                       DO 10 i = 1,j - 1237                           ap(k) = ap(k) + x(i)*temp1 + y(i)*temp2238                           k = k + 1239    10                 CONTINUE240                       ap(kk+j-1) = REAL(AP(KK+J-1)) +241      +                             REAL(x(j)*temp1+y(j)*temp2)242                   ELSE243                       ap(kk+j-1) = REAL(ap(kk+j-1))244                   END IF245                   kk = kk + j246    20         CONTINUE247           ELSE248               DO 40 j = 1,n249                   IF ((x(jx).NE.zero) .OR. (y(jy).NE.zero)) THEN250                       temp1 = alpha*conjg(y(jy))251                       temp2 = conjg(alpha*x(jx))252                       ix = kx253                       iy = ky254                       DO 30 k = kk,kk + j - 2255                           ap(k) = ap(k) + x(ix)*temp1 + y(iy)*temp2256                           ix = ix + incx257                           iy = iy + incy258    30                 CONTINUE259                       ap(kk+j-1) = REAL(AP(KK+J-1)) +260      +                             REAL(x(jx)*temp1+y(jy)*temp2)261                   ELSE262                       ap(kk+j-1) = REAL(ap(kk+j-1))263                   END IF264                   jx = jx + incx265                   jy = jy + incy266                   kk = kk + j267    40         CONTINUE268           END IF269       ELSE270 *271 *        Form  A  when lower triangle is stored in AP.272 *273           IF ((incx.EQ.1) .AND. (incy.EQ.1)) THEN274               DO 60 j = 1,n275                   IF ((x(j).NE.zero) .OR. (y(j).NE.zero)) THEN276                       temp1 = alpha*conjg(y(j))277                       temp2 = conjg(alpha*x(j))278                       ap(kk) = REAL(AP(KK)) +279      +                         REAL(x(j)*temp1+y(j)*temp2)280                       k = kk + 1281                       DO 50 i = j + 1,n282                           ap(k) = ap(k) + x(i)*temp1 + y(i)*temp2283                           k = k + 1284    50                 CONTINUE285                   ELSE286                       ap(kk) = REAL(ap(kk))287                   END IF288                   kk = kk + n - j + 1289    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                       ap(kk) = REAL(AP(KK)) +296      +                         REAL(x(jx)*temp1+y(jy)*temp2)297                       ix = jx298                       iy = jy299                       DO 70 k = kk + 1,kk + n - j300                           ix = ix + incx301                           iy = iy + incy302                           ap(k) = ap(k) + x(ix)*temp1 + y(iy)*temp2303    70                 CONTINUE304                   ELSE305                       ap(kk) = REAL(ap(kk))306                   END IF307                   jx = jx + incx308                   jy = jy + incy309                   kk = kk + n - j + 1310    80         CONTINUE311           END IF312       END IF313 *314       RETURN315 *316 *     End of CHPR2 .317 *
 

Author

Generated automatically by Doxygen for LAPACK from the source code.


 

Index

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

This document was created byman2html,using the manual pages.