Research Article

Performance Optimization and Modeling of Fine-Grained Irregular Communication in UPC

Listing 1

A straightforward sequential implementation of SpMV using a modified EllPack storage format.
for (int i = 0; i < n; i++) {
double tmp = 0.0;
for (int j = 0; j < rnz; j++)
  tmp += A[i ∗ rnz + j] ∗ x[J[i ∗ rnz + j]];
y[i] = D[i] ∗ x[i] + tmp;
}