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

ctpmv.f

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

NAME

ctpmv.f -  

SYNOPSIS


 

Functions/Subroutines


subroutine CTPMV (UPLO, TRANS, DIAG, N, AP, X, INCX)
CTPMV  

Function/Subroutine Documentation

 

subroutine CTPMV (character UPLO, character TRANS, character DIAG, integer N, complex, dimension(*) AP, complex, dimension(*) X, integer INCX)

CTPMV

Purpose:

 CTPMV  performs one of the matrix-vector operations    x := A*x,   or   x := A**T*x,   or   x := A**H*x, where x is an n element vector and  A is an n by n unit, or non-unit, upper or lower triangular matrix, supplied in packed form.


 

Parameters:

UPLO

          UPLO is CHARACTER*1           On entry, UPLO specifies whether the matrix is an upper or           lower triangular matrix as follows:              UPLO = 'U' or 'u'   A is an upper triangular matrix.              UPLO = 'L' or 'l'   A is a lower triangular matrix.


TRANS

          TRANS is CHARACTER*1           On entry, TRANS specifies the operation to be performed as           follows:              TRANS = 'N' or 'n'   x := A*x.              TRANS = 'T' or 't'   x := A**T*x.              TRANS = 'C' or 'c'   x := A**H*x.


DIAG

          DIAG is CHARACTER*1           On entry, DIAG specifies whether or not A is unit           triangular as follows:              DIAG = 'U' or 'u'   A is assumed to be unit triangular.              DIAG = 'N' or 'n'   A is not assumed to be unit                                  triangular.


N

          N is INTEGER           On entry, N specifies the order of the matrix A.           N must be at least 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 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 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 when  DIAG = 'U' or 'u', the diagonal elements of           A are not referenced, but are assumed to be unity.


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. On exit, X is overwritten with the           tranformed vector x.


INCX

          INCX is INTEGER           On entry, INCX specifies the increment for the elements of           X. INCX 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 144 of file ctpmv.f.

144 *145 *  -- Reference BLAS level2 routine (version 3.4.0) --146 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --147 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--148 *     November 2011149 *150 *     .. Scalar Arguments ..151       INTEGER incx,n152       CHARACTER diag,trans,uplo153 *     ..154 *     .. Array Arguments ..155       COMPLEX ap(*),x(*)156 *     ..157 *158 *  =====================================================================159 *160 *     .. Parameters ..161       COMPLEX zero162       parameter(zero= (0.0e+0,0.0e+0))163 *     ..164 *     .. Local Scalars ..165       COMPLEX temp166       INTEGER i,info,ix,j,jx,k,kk,kx167       LOGICAL noconj,nounit168 *     ..169 *     .. External Functions ..170       LOGICAL lsame171       EXTERNAL lsame172 *     ..173 *     .. External Subroutines ..174       EXTERNAL xerbla175 *     ..176 *     .. Intrinsic Functions ..177       INTRINSIC conjg178 *     ..179 *180 *     Test the input parameters.181 *182       info = 0183       IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN184           info = 1185       ELSE IF (.NOT.lsame(trans,'N') .AND. .NOT.lsame(trans,'T') .AND.186      +         .NOT.lsame(trans,'C')) THEN187           info = 2188       ELSE IF (.NOT.lsame(diag,'U') .AND. .NOT.lsame(diag,'N')) THEN189           info = 3190       ELSE IF (n.LT.0) THEN191           info = 4192       ELSE IF (incx.EQ.0) THEN193           info = 7194       END IF195       IF (info.NE.0) THEN196           CALL xerbla('CTPMV ',info)197           RETURN198       END IF199 *200 *     Quick return if possible.201 *202       IF (n.EQ.0) RETURN203 *204       noconj = lsame(trans,'T')205       nounit = lsame(diag,'N')206 *207 *     Set up the start point in X if the increment is not unity. This208 *     will be  ( N - 1 )*INCX  too small for descending loops.209 *210       IF (incx.LE.0) THEN211           kx = 1 - (n-1)*incx212       ELSE IF (incx.NE.1) THEN213           kx = 1214       END IF215 *216 *     Start the operations. In this version the elements of AP are217 *     accessed sequentially with one pass through AP.218 *219       IF (lsame(trans,'N')) THEN220 *221 *        Form  x:= A*x.222 *223           IF (lsame(uplo,'U')) THEN224               kk = 1225               IF (incx.EQ.1) THEN226                   DO 20 j = 1,n227                       IF (x(j).NE.zero) THEN228                           temp = x(j)229                           k = kk230                           DO 10 i = 1,j - 1231                               x(i) = x(i) + temp*ap(k)232                               k = k + 1233    10                     CONTINUE234                           IF (nounit) x(j) = x(j)*ap(kk+j-1)235                       END IF236                       kk = kk + j237    20             CONTINUE238               ELSE239                   jx = kx240                   DO 40 j = 1,n241                       IF (x(jx).NE.zero) THEN242                           temp = x(jx)243                           ix = kx244                           DO 30 k = kk,kk + j - 2245                               x(ix) = x(ix) + temp*ap(k)246                               ix = ix + incx247    30                     CONTINUE248                           IF (nounit) x(jx) = x(jx)*ap(kk+j-1)249                       END IF250                       jx = jx + incx251                       kk = kk + j252    40             CONTINUE253               END IF254           ELSE255               kk = (n* (n+1))/2256               IF (incx.EQ.1) THEN257                   DO 60 j = n,1,-1258                       IF (x(j).NE.zero) THEN259                           temp = x(j)260                           k = kk261                           DO 50 i = n,j + 1,-1262                               x(i) = x(i) + temp*ap(k)263                               k = k - 1264    50                     CONTINUE265                           IF (nounit) x(j) = x(j)*ap(kk-n+j)266                       END IF267                       kk = kk - (n-j+1)268    60             CONTINUE269               ELSE270                   kx = kx + (n-1)*incx271                   jx = kx272                   DO 80 j = n,1,-1273                       IF (x(jx).NE.zero) THEN274                           temp = x(jx)275                           ix = kx276                           DO 70 k = kk,kk - (n- (j+1)),-1277                               x(ix) = x(ix) + temp*ap(k)278                               ix = ix - incx279    70                     CONTINUE280                           IF (nounit) x(jx) = x(jx)*ap(kk-n+j)281                       END IF282                       jx = jx - incx283                       kk = kk - (n-j+1)284    80             CONTINUE285               END IF286           END IF287       ELSE288 *289 *        Form  x := A**T*x  or  x := A**H*x.290 *291           IF (lsame(uplo,'U')) THEN292               kk = (n* (n+1))/2293               IF (incx.EQ.1) THEN294                   DO 110 j = n,1,-1295                       temp = x(j)296                       k = kk - 1297                       IF (noconj) THEN298                           IF (nounit) temp = temp*ap(kk)299                           DO 90 i = j - 1,1,-1300                               temp = temp + ap(k)*x(i)301                               k = k - 1302    90                     CONTINUE303                       ELSE304                           IF (nounit) temp = temp*conjg(ap(kk))305                           DO 100 i = j - 1,1,-1306                               temp = temp + conjg(ap(k))*x(i)307                               k = k - 1308   100                     CONTINUE309                       END IF310                       x(j) = temp311                       kk = kk - j312   110             CONTINUE313               ELSE314                   jx = kx + (n-1)*incx315                   DO 140 j = n,1,-1316                       temp = x(jx)317                       ix = jx318                       IF (noconj) THEN319                           IF (nounit) temp = temp*ap(kk)320                           DO 120 k = kk - 1,kk - j + 1,-1321                               ix = ix - incx322                               temp = temp + ap(k)*x(ix)323   120                     CONTINUE324                       ELSE325                           IF (nounit) temp = temp*conjg(ap(kk))326                           DO 130 k = kk - 1,kk - j + 1,-1327                               ix = ix - incx328                               temp = temp + conjg(ap(k))*x(ix)329   130                     CONTINUE330                       END IF331                       x(jx) = temp332                       jx = jx - incx333                       kk = kk - j334   140             CONTINUE335               END IF336           ELSE337               kk = 1338               IF (incx.EQ.1) THEN339                   DO 170 j = 1,n340                       temp = x(j)341                       k = kk + 1342                       IF (noconj) THEN343                           IF (nounit) temp = temp*ap(kk)344                           DO 150 i = j + 1,n345                               temp = temp + ap(k)*x(i)346                               k = k + 1347   150                     CONTINUE348                       ELSE349                           IF (nounit) temp = temp*conjg(ap(kk))350                           DO 160 i = j + 1,n351                               temp = temp + conjg(ap(k))*x(i)352                               k = k + 1353   160                     CONTINUE354                       END IF355                       x(j) = temp356                       kk = kk + (n-j+1)357   170             CONTINUE358               ELSE359                   jx = kx360                   DO 200 j = 1,n361                       temp = x(jx)362                       ix = jx363                       IF (noconj) THEN364                           IF (nounit) temp = temp*ap(kk)365                           DO 180 k = kk + 1,kk + n - j366                               ix = ix + incx367                               temp = temp + ap(k)*x(ix)368   180                     CONTINUE369                       ELSE370                           IF (nounit) temp = temp*conjg(ap(kk))371                           DO 190 k = kk + 1,kk + n - j372                               ix = ix + incx373                               temp = temp + conjg(ap(k))*x(ix)374   190                     CONTINUE375                       END IF376                       x(jx) = temp377                       jx = jx + incx378                       kk = kk + (n-j+1)379   200             CONTINUE380               END IF381           END IF382       END IF383 *384       RETURN385 *386 *     End of CTPMV .387 *
 

Author

Generated automatically by Doxygen for LAPACK from the source code.


 

Index

NAME
SYNOPSIS
Functions/Subroutines
Function/Subroutine Documentation
subroutine CTPMV (character UPLO, character TRANS, character DIAG, integer N, complex, dimension(*) AP, complex, dimension(*) X, integer INCX)
Author

This document was created byman2html,using the manual pages.