18 template <
typename T,
typename L>
26 #pragma omp simd reduction(+:sum) 27 for (L i=0; i < length; i++)
32 L offset = length % 2;
33 length = floor(length / 2);
34 sum = pairwise_sum<T>(&vector[0], length) +
35 pairwise_sum<T>(&vector[length], length+offset);
double pairwise_sum(T *vector, L length)
Performs a pairwise sum of an array of numbers.
Definition: pairwise_sum.h:19