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

chpr.f

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

NAME

chpr.f 

SYNOPSIS


 

Functions/Subroutines


subroutine CHPR (UPLO, N, ALPHA, X, INCX, AP)
CHPR  

Function/Subroutine Documentation

 

subroutine CHPR (character UPLO, integer N, real ALPHA, complex, dimension(*) X, integer INCX, complex, dimension(*) AP)

CHPR

Purpose:

 CHPR    performs the hermitian rank 1 operation    A := alpha*x*x**H + A, where alpha is a real scalar, x is an n element vector 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 REAL           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.


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 132 of file chpr.f.

132 *133 *  -- Reference BLAS level2 routine (version 3.4.0) --134 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --135 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--136 *     November 2011137 *138 *     .. Scalar Arguments ..139       REAL ALPHA140       INTEGER INCX,N141       CHARACTER UPLO142 *     ..143 *     .. Array Arguments ..144       COMPLEX AP(*),X(*)145 *     ..146 *147 *  =====================================================================148 *149 *     .. Parameters ..150       COMPLEX ZERO151       parameter(zero= (0.0e+0,0.0e+0))152 *     ..153 *     .. Local Scalars ..154       COMPLEX TEMP155       INTEGER I,INFO,IX,J,JX,K,KK,KX156 *     ..157 *     .. External Functions ..158       LOGICAL LSAME159       EXTERNAL lsame160 *     ..161 *     .. External Subroutines ..162       EXTERNAL xerbla163 *     ..164 *     .. Intrinsic Functions ..165       INTRINSIC conjg,real166 *     ..167 *168 *     Test the input parameters.169 *170       info = 0171       IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN172           info = 1173       ELSE IF (n.LT.0) THEN174           info = 2175       ELSE IF (incx.EQ.0) THEN176           info = 5177       END IF178       IF (info.NE.0) THEN179           CALL xerbla('CHPR  ',info)180           RETURN181       END IF182 *183 *     Quick return if possible.184 *185       IF ((n.EQ.0) .OR. (alpha.EQ.REAL(ZERO))) RETURN186 *187 *     Set the start point in X if the increment is not unity.188 *189       IF (incx.LE.0) THEN190           kx = 1 - (n-1)*incx191       ELSE IF (incx.NE.1) THEN192           kx = 1193       END IF194 *195 *     Start the operations. In this version the elements of the array AP196 *     are accessed sequentially with one pass through AP.197 *198       kk = 1199       IF (lsame(uplo,'U')) THEN200 *201 *        Form  A  when upper triangle is stored in AP.202 *203           IF (incx.EQ.1) THEN204               DO 20 j = 1,n205                   IF (x(j).NE.zero) THEN206                       temp = alpha*conjg(x(j))207                       k = kk208                       DO 10 i = 1,j - 1209                           ap(k) = ap(k) + x(i)*temp210                           k = k + 1211    10                 CONTINUE212                       ap(kk+j-1) = REAL(AP(KK+J-1)) + REAL(X(J)*TEMP)213                   ELSE214                       ap(kk+j-1) = REAL(AP(KK+J-1))215                   END IF216                   kk = kk + j217    20         CONTINUE218           ELSE219               jx = kx220               DO 40 j = 1,n221                   IF (x(jx).NE.zero) THEN222                       temp = alpha*conjg(x(jx))223                       ix = kx224                       DO 30 k = kk,kk + j - 2225                           ap(k) = ap(k) + x(ix)*temp226                           ix = ix + incx227    30                 CONTINUE228                       ap(kk+j-1) = REAL(AP(KK+J-1)) + REAL(X(JX)*TEMP)229                   ELSE230                       ap(kk+j-1) = REAL(AP(KK+J-1))231                   END IF232                   jx = jx + incx233                   kk = kk + j234    40         CONTINUE235           END IF236       ELSE237 *238 *        Form  A  when lower triangle is stored in AP.239 *240           IF (incx.EQ.1) THEN241               DO 60 j = 1,n242                   IF (x(j).NE.zero) THEN243                       temp = alpha*conjg(x(j))244                       ap(kk) = REAL(AP(KK)) + REAL(TEMP*X(J))245                       k = kk + 1246                       DO 50 i = j + 1,n247                           ap(k) = ap(k) + x(i)*temp248                           k = k + 1249    50                 CONTINUE250                   ELSE251                       ap(kk) = REAL(AP(KK))252                   END IF253                   kk = kk + n - j + 1254    60         CONTINUE255           ELSE256               jx = kx257               DO 80 j = 1,n258                   IF (x(jx).NE.zero) THEN259                       temp = alpha*conjg(x(jx))260                       ap(kk) = REAL(AP(KK)) + REAL(TEMP*X(JX))261                       ix = jx262                       DO 70 k = kk + 1,kk + n - j263                           ix = ix + incx264                           ap(k) = ap(k) + x(ix)*temp265    70                 CONTINUE266                   ELSE267                       ap(kk) = REAL(AP(KK))268                   END IF269                   jx = jx + incx270                   kk = kk + n - j + 1271    80         CONTINUE272           END IF273       END IF274 *275       RETURN276 *277 *     End of CHPR  .278 *
 

Author

Generated automatically by Doxygen for LAPACK from the source code.


 

Index

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

This document was created byman2html,using the manual pages.