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

# chpmv.f

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

chpmv.f -

## SYNOPSIS

### Functions/Subroutines

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

## Function/Subroutine Documentation

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

CHPMV

Purpose:

` CHPMV  performs the matrix-vector operation    y := alpha*A*x + beta*y, where alpha and beta are scalars, 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.`

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.           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.           Note that the imaginary parts of the diagonal elements need           not be set and are assumed to be zero.`

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.`

BETA

`          BETA is COMPLEX           On entry, BETA specifies the scalar beta. When BETA is           supplied as zero then Y need not be set on input.`

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. On exit, Y is overwritten by the updated           vector y.`

INCY

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

Author:

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Date:

November 2011

Further Details:

`  Level 2 Blas routine.  The vector and matrix arguments are not referenced when N = 0, or M = 0  -- 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 151 of file chpmv.f.

`151 *152 *  -- Reference BLAS level2 routine (version 3.4.0) --153 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --154 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--155 *     November 2011156 *157 *     .. Scalar Arguments ..158       COMPLEX alpha,beta159       INTEGER incx,incy,n160       CHARACTER uplo161 *     ..162 *     .. Array Arguments ..163       COMPLEX ap(*),x(*),y(*)164 *     ..165 *166 *  =====================================================================167 *168 *     .. Parameters ..169       COMPLEX one170       parameter(one= (1.0e+0,0.0e+0))171       COMPLEX zero172       parameter(zero= (0.0e+0,0.0e+0))173 *     ..174 *     .. Local Scalars ..175       COMPLEX temp1,temp2176       INTEGER i,info,ix,iy,j,jx,jy,k,kk,kx,ky177 *     ..178 *     .. External Functions ..179       LOGICAL lsame180       EXTERNAL lsame181 *     ..182 *     .. External Subroutines ..183       EXTERNAL xerbla184 *     ..185 *     .. Intrinsic Functions ..186       INTRINSIC conjg,real187 *     ..188 *189 *     Test the input parameters.190 *191       info = 0192       IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN193           info = 1194       ELSE IF (n.LT.0) THEN195           info = 2196       ELSE IF (incx.EQ.0) THEN197           info = 6198       ELSE IF (incy.EQ.0) THEN199           info = 9200       END IF201       IF (info.NE.0) THEN202           CALL xerbla('CHPMV ',info)203           RETURN204       END IF205 *206 *     Quick return if possible.207 *208       IF ((n.EQ.0) .OR. ((alpha.EQ.zero).AND. (beta.EQ.one))) RETURN209 *210 *     Set up the start points in  X  and  Y.211 *212       IF (incx.GT.0) THEN213           kx = 1214       ELSE215           kx = 1 - (n-1)*incx216       END IF217       IF (incy.GT.0) THEN218           ky = 1219       ELSE220           ky = 1 - (n-1)*incy221       END IF222 *223 *     Start the operations. In this version the elements of the array AP224 *     are accessed sequentially with one pass through AP.225 *226 *     First form  y := beta*y.227 *228       IF (beta.NE.one) THEN229           IF (incy.EQ.1) THEN230               IF (beta.EQ.zero) THEN231                   DO 10 i = 1,n232                       y(i) = zero233    10             CONTINUE234               ELSE235                   DO 20 i = 1,n236                       y(i) = beta*y(i)237    20             CONTINUE238               END IF239           ELSE240               iy = ky241               IF (beta.EQ.zero) THEN242                   DO 30 i = 1,n243                       y(iy) = zero244                       iy = iy + incy245    30             CONTINUE246               ELSE247                   DO 40 i = 1,n248                       y(iy) = beta*y(iy)249                       iy = iy + incy250    40             CONTINUE251               END IF252           END IF253       END IF254       IF (alpha.EQ.zero) RETURN255       kk = 1256       IF (lsame(uplo,'U')) THEN257 *258 *        Form  y  when AP contains the upper triangle.259 *260           IF ((incx.EQ.1) .AND. (incy.EQ.1)) THEN261               DO 60 j = 1,n262                   temp1 = alpha*x(j)263                   temp2 = zero264                   k = kk265                   DO 50 i = 1,j - 1266                       y(i) = y(i) + temp1*ap(k)267                       temp2 = temp2 + conjg(ap(k))*x(i)268                       k = k + 1269    50             CONTINUE270                   y(j) = y(j) + temp1*REAL(AP(KK+J-1)) + alpha*temp2271                   kk = kk + j272    60         CONTINUE273           ELSE274               jx = kx275               jy = ky276               DO 80 j = 1,n277                   temp1 = alpha*x(jx)278                   temp2 = zero279                   ix = kx280                   iy = ky281                   DO 70 k = kk,kk + j - 2282                       y(iy) = y(iy) + temp1*ap(k)283                       temp2 = temp2 + conjg(ap(k))*x(ix)284                       ix = ix + incx285                       iy = iy + incy286    70             CONTINUE287                   y(jy) = y(jy) + temp1*REAL(AP(KK+J-1)) + alpha*temp2288                   jx = jx + incx289                   jy = jy + incy290                   kk = kk + j291    80         CONTINUE292           END IF293       ELSE294 *295 *        Form  y  when AP contains the lower triangle.296 *297           IF ((incx.EQ.1) .AND. (incy.EQ.1)) THEN298               DO 100 j = 1,n299                   temp1 = alpha*x(j)300                   temp2 = zero301                   y(j) = y(j) + temp1*REAL(ap(kk))302                   k = kk + 1303                   DO 90 i = j + 1,n304                       y(i) = y(i) + temp1*ap(k)305                       temp2 = temp2 + conjg(ap(k))*x(i)306                       k = k + 1307    90             CONTINUE308                   y(j) = y(j) + alpha*temp2309                   kk = kk + (n-j+1)310   100         CONTINUE311           ELSE312               jx = kx313               jy = ky314               DO 120 j = 1,n315                   temp1 = alpha*x(jx)316                   temp2 = zero317                   y(jy) = y(jy) + temp1*REAL(ap(kk))318                   ix = jx319                   iy = jy320                   DO 110 k = kk + 1,kk + n - j321                       ix = ix + incx322                       iy = iy + incy323                       y(iy) = y(iy) + temp1*ap(k)324                       temp2 = temp2 + conjg(ap(k))*x(ix)325   110             CONTINUE326                   y(jy) = y(jy) + alpha*temp2327                   jx = jx + incx328                   jy = jy + incy329                   kk = kk + (n-j+1)330   120         CONTINUE331           END IF332       END IF333 *334       RETURN335 *336 *     End of CHPMV .337 *`

## Author

Generated automatically by Doxygen for LAPACK from the source code.

## Index

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

This document was created byman2html,using the manual pages.