POOMA Data-Parallel Syntax


The addition v + w of two mathematical vectors v and w adds the vectors’ components to form a new vector. POOMA data-parallel syntax directly corresponds to mathematical syntax. For example, the addition of two Vectors v and w:

x = v + w;

is equivalent to the element-wise computation:

for (unsigned index = 0;
     index < x.size();
     ++index)
  x[index] = v[index] + w[index];

except the order of component addition is not specified for the former.