{S,D,C,Z}SUMI ( nz, x, indx, y )
nz integer*4 On entry, the number of elements in the vector in the compressed form. On exit, nz is unchanged. x real*4 | real*8 | complex*8 | complex*16 On entry, an array of the elements of vector x in compressed form. On exit, x is unchanged. indx integer*4 On entry, an array containing the indices of the compressed form. The values in the INDX array 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 of the elements of vector y stored in full form. 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 overwritten.
SSUMI and DSUMI add a sparse vector of real values stored in compressed form to a real vector stored in full form. CSUMI and ZSUMI add a sparse vector of complex values stored in compressed form to a complex vector stored in full form. Only the elements of vector y whose indices are listed in array INDX are overwritten. For i =1, ..., nz: y(indx(i)) = y(indx(i)) + x(i) If nz <= 0, y is unchanged. The _SUMI subprograms are an efficient implementation of the _AXPYI subprograms when alpha = 1.0. The _SUMI subprograms are not part of the original set of Sparse BLAS Level 1 subprograms.
INTEGER NZ, INDX(20) REAL*8 Y(100), X(20) NZ = 20 CALL DSUMI(NZ, X, INDX, Y) This FORTRAN code shows how the nz elements in y, corresponding to the indices in the array INDX, are updated by the addition of the corresponding element of the compressed vector, x.