SAXPY/DAXPY/CAXPY/CAXPYC/ZAXPY/ZAXPYC

Elementary vector operation

 

INTEGER*8

n, incx, incy

 

 

COMPLEX*8

a, x(lenx), y(leny)

 

CALL CAXPY(n, a, x, incx, y, incy)

 

 

INTEGER*8

n, incx, incy

 

 

COMPLEX*8

a, x(lenx), y(leny)

 

CALL CAXPYC(n, a, x, incx, y, incy)

 

INTEGER*8

n, incx, incy

 

 

COMPLEX*16

a, x(lenx), y(leny)

 

CALL ZAXPY(n, a, x, incx, y, incy)

 

 

INTEGER*8

n, incx, incy

 

 

COMPLEX*16

a, x(lenx), y(leny)

 

CALL ZAXPYC(n, a, x, incx, y, incy)

Input

n

Number of elements of vectors x and y to be used in the

 

 

elementary vector operation. If n ≤ 0, the subprograms

 

 

do not reference x or y.

 

a

The scalar a.

 

 

x

Array of length lenx = (n−1)⋅incx+1 containing the

 

 

n-vector x. x is used in conjugated form by CAXPYC

 

 

and ZAXPYC and in unconjugated form by the other

 

 

subprograms.

 

 

incx

Increment for the array x:

 

 

incx ≥ 0

x is stored forward in array x; that is,

 

 

 

xi is stored in x((i−1)⋅incx+1).

 

 

incx < 0

x is stored backward in array x; that

 

 

 

is, xi is stored in x((in)⋅incx+1).

 

 

Use incx = 1 if the vector x is stored contiguously in

 

 

array x; that is, if xi is stored in x(i). Refer to “BLAS

 

 

Indexing Conventions” in the introduction to this

 

 

chapter.

 

 

y

Array of length leny = (n−1)⋅incy+1 containing the

 

 

n-vector y.

 

 

incy

Increment for the array y, incy ≠ 0:

 

 

incy > 0

y is stored forward in array y; that is,

 

 

 

yi is stored in y((i−1)⋅incy+1).

 

 

incy < 0

y is stored backward in array y; that

 

 

 

is, yi is stored in y((in)⋅incy+1).

66HP MLIB User’s Guide