SAXPYI/DAXPYI/CAXPYI/ZAXPYI

Sparse elementary vector operation

Name SAXPYI/DAXPYI/CAXPYI/ZAXPYI

Sparse elementary vector operation

Purpose Given a real or complex scalar a, a sparse vector x stored in compact form via a set of indices and a dense vector y stored in full storage form, these subprograms perform the elementary vector operation

y ax + y.

More precisely, let x be a sparse n-vector with m n interesting (usually nonzero) elements, and let {k1, k2, ..., km} be the indices of these elements. All uninteresting elements of x are assumed to be zero. Let y be an ordinary n-vector. If x is represented by arrays x and indx such that indx(i) = ki and x(i) = xki then these subprograms compute

yki axi + yki,

i = 1, 2, …, m.

Usage

VECLIB:

 

 

INTEGER*4

m, indx(m)

 

REAL*4

a, x(m), y(n)

CALL SAXPYI(m, a, x, indx, y)

INTEGER*4

m, indx(m)

REAL*8

a, x(m), y(n)

CALL DAXPYI(m, a, x, indx, y)

INTEGER*4

m, indx(m)

COMPLEX*8

a, x(m), y(n)

CALL CAXPYI(m, a, x, indx, y)

INTEGER*4

m, indx(m)

COMPLEX*16

a, x(m), y(n)

CALL ZAXPYI(m, a, x, indx, y)

VECLIB8:

INTEGER*8

m, indx(m)

REAL*4

a, x(m), y(n)

CALL SAXPYI(m, a, x, indx, y)

INTEGER*8

m, indx(m)

REAL*8

a, x(m), y(n)

CALL DAXPYI(m, a, x, indx, y)

68HP MLIB User’s Guide