CXML
ssctrs, dsctrs, csctrs, zsctrs
Scales and scatters the elements of a
sparse vector
FORMAT
{S,D,C,Z}SCTRS ( nz, alpha, x, indx, y )
Arguments
nz integer*4
On entry, the number of elements to be scattered from
the compressed form.
On exit, nz is unchanged.
alpha real*4 | real*8 | complex*8 | complex*16
On entry, the scalar multiplier for the elements of
vector x.
On exit, alpha is unchanged.
x real*4 | real*8 | complex*8 | complex*16
On entry, an array of the elements of vector x to be
scattered from compressed form into full form.
On exit, x is unchanged.
indx integer*4
On entry, an array containing the indices of the values
to be scattered from the compressed form. The values in
INDX must be distinct for consistent vector or parallel
execution.
On exit, indx is unchanged.
y real*4 | real*8 | complex*8 | complex*16
On entry, an array that receives the scaled elements of
the vector x.
On exit, if nz <= 0, y is unchanged. If nz > 0, the
elements in the vector y corresponding to the indices
in the INDX array are set to the corresponding scaled
entries of x.
Description
The _SCTRS subprograms multiply the elements of a sparse vector x stored in
compressed form by a scalar alpha and then scatter them into the specified
elements of the vector y stored in full form.
For i=1, ..., nz:
y(indx(i)) = alpha * x(i)
If nz <= 0, y is unchanged.
SSCTRS and DSCTRS scatter the elements of a real sparse vector stored in
compressed form, after scaling, into the specified elements of a real
vector stored in full form. CSCTRS and ZSCTRS scatter the elements of a
complex sparse vector stored in compressed form, after scaling, into the
specified elements of a complex vector stored in full form.
The _SCTRS subprograms are not part of the original set of Sparse BLAS
Level 1 subprograms.
Example
INTEGER NZ, INDX(10)
REAL*8 Y(40), X(10), ALPHA
NZ = 10
ALPHA = 2.5D0
CALL DSCTRS(NZ, ALPHA, X, INDX, Y)
This FORTRAN code scales the elements of a sparse vector x, stored in
compressed form, by the scalar alpha, and then scatters them into the
specified elements of the vector y, stored in full form.
CXML Home Page Index of CXML Routines