2 * O(nlog n) work algorithm (Hillis-Steele)
4 #include "hillis_partial.h"
7 * Hillis/Steele, prefix sum version
9 void algorithm (numtype x[], unsigned long size, unsigned int ops[]) {
13 for(k=2; k <= size; k <<=1){
14 #pragma omp parallel for shared(x, size, ops, k) private(i)
15 for(i = (k-1); i < size; i+=k){
17 printf ("x[%2li] = x[%2li] + x[%2li]; // {i:%li, k:%li}\n", i, i-k, i, i, k);
19 x[i] = x[i-(k/2)] + x[i];