Previous: Defining a subset, Up: Subsets
Reduction operations (norms, inner products, global sums) come in two variants according to whether the result is computed on a single subset of the lattice or on multiple subsets. Thus the operation
QLA_Complex z; QDP_ColorVector *a, *b; QDP_c_eq_V_dot_V(&z, a, b, QDP_even);
sums the dot product of the lattice staggered fermion fields a and b on the even sites and stores the result in z. The operation
QLA_Complex z[nt]; QDP_ColorVector *a, *b; QDP_c_eq_V_dot_V_multi(z, a, b, ts, nt);
with the timeslice subsets illustrated above computes the dot product summed separately on each timeslice and stores the sums in the array z, so that the value in z[i] results from the sum on the subset ts[i].