HP MLIB User's Guide Vol. 1 7th Ed.

68 HP MLIB User’s Guide
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
More precisely, let x be a sparse n-vector with m n interesting (usually
nonzero) elements, and let {k
1
, k
2
, ..., k
m
} 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)=k
i
and
x(i)=x
k
i
then these subprograms compute
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)
yax y.+
y
k
i
ax
i
y
k
i
,+ i 12 m.,, ,=