MAN page from openSUSE Leap 42 blas-man-3.5.0-9.1.noarch.rpm
cher.f
Section: LAPACK (3)
Updated: Fri Nov 4 2016
Index NAME
cher.f -
SYNOPSIS
Functions/Subroutines
subroutine CHER (UPLO, N, ALPHA, X, INCX, A, LDA)
CHER
Function/Subroutine Documentation
subroutine CHER (character UPLO, integer N, real ALPHA, complex, dimension(*) X, integer INCX, complex, dimension(lda,*) A, integer LDA)
CHER
Purpose:
CHER 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.
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 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.
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
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 137 of file cher.f.
137 *138 * -- Reference BLAS level2 routine (version 3.4.0) --139 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --140 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--141 * November 2011142 *143 * .. Scalar Arguments ..144 REAL alpha145 INTEGER incx,lda,n146 CHARACTER uplo147 * ..148 * .. Array Arguments ..149 COMPLEX a(lda,*),x(*)150 * ..151 *152 * =====================================================================153 *154 * .. Parameters ..155 COMPLEX zero156 parameter(zero= (0.0e+0,0.0e+0))157 * ..158 * .. Local Scalars ..159 COMPLEX temp160 INTEGER i,info,ix,j,jx,kx161 * ..162 * .. External Functions ..163 LOGICAL lsame164 EXTERNAL lsame165 * ..166 * .. External Subroutines ..167 EXTERNAL xerbla168 * ..169 * .. Intrinsic Functions ..170 INTRINSIC conjg,max,real171 * ..172 *173 * Test the input parameters.174 *175 info = 0176 IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN177 info = 1178 ELSE IF (n.LT.0) THEN179 info = 2180 ELSE IF (incx.EQ.0) THEN181 info = 5182 ELSE IF (lda.LT.max(1,n)) THEN183 info = 7184 END IF185 IF (info.NE.0) THEN186 CALL xerbla('CHER ',info)187 RETURN188 END IF189 *190 * Quick return if possible.191 *192 IF ((n.EQ.0) .OR. (alpha.EQ.REAL(zero))) return193 *194 * Set the start point in X if the increment is not unity.195 *196 IF (incx.LE.0) THEN197 kx = 1 - (n-1)*incx198 ELSE IF (incx.NE.1) THEN199 kx = 1200 END IF201 *202 * Start the operations. In this version the elements of A are203 * accessed sequentially with one pass through the triangular part204 * of A.205 *206 IF (lsame(uplo,'U')) THEN207 *208 * Form A when A is stored in upper triangle.209 *210 IF (incx.EQ.1) THEN211 DO 20 j = 1,n212 IF (x(j).NE.zero) THEN213 temp = alpha*conjg(x(j))214 DO 10 i = 1,j - 1215 a(i,j) = a(i,j) + x(i)*temp216 10 CONTINUE217 a(j,j) = REAL(A(J,J)) + REAL(x(j)*temp)218 ELSE219 a(j,j) = REAL(a(j,j))220 END IF221 20 CONTINUE222 ELSE223 jx = kx224 DO 40 j = 1,n225 IF (x(jx).NE.zero) THEN226 temp = alpha*conjg(x(jx))227 ix = kx228 DO 30 i = 1,j - 1229 a(i,j) = a(i,j) + x(ix)*temp230 ix = ix + incx231 30 CONTINUE232 a(j,j) = REAL(A(J,J)) + REAL(x(jx)*temp)233 ELSE234 a(j,j) = REAL(a(j,j))235 END IF236 jx = jx + incx237 40 CONTINUE238 END IF239 ELSE240 *241 * Form A when A is stored in lower triangle.242 *243 IF (incx.EQ.1) THEN244 DO 60 j = 1,n245 IF (x(j).NE.zero) THEN246 temp = alpha*conjg(x(j))247 a(j,j) = REAL(A(J,J)) + REAL(temp*x(j))248 DO 50 i = j + 1,n249 a(i,j) = a(i,j) + x(i)*temp250 50 CONTINUE251 ELSE252 a(j,j) = REAL(a(j,j))253 END IF254 60 CONTINUE255 ELSE256 jx = kx257 DO 80 j = 1,n258 IF (x(jx).NE.zero) THEN259 temp = alpha*conjg(x(jx))260 a(j,j) = REAL(A(J,J)) + REAL(temp*x(jx))261 ix = jx262 DO 70 i = j + 1,n263 ix = ix + incx264 a(i,j) = a(i,j) + x(ix)*temp265 70 CONTINUE266 ELSE267 a(j,j) = REAL(a(j,j))268 END IF269 jx = jx + incx270 80 CONTINUE271 END IF272 END IF273 *274 RETURN275 *276 * End of CHER .277 *
Author
Generated automatically by Doxygen for LAPACK from the source code.
Index
- NAME
- SYNOPSIS
- Functions/Subroutines
- Function/Subroutine Documentation
- subroutine CHER (character UPLO, integer N, real ALPHA, complex, dimension(*) X, integer INCX, complex, dimension(lda,*) A, integer LDA)
- Author
This document was created byman2html,using the manual pages.