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[]) {
14 for(k=2; k <= size; k <<=1){
15 #pragma omp parallel for shared(x, size, ops, k) private(i)
16 for(i = (k-1); i < size; i+=k){
18 printf ("x[%2li] = x[%2li] + x[%2li]; // {i:%li, k:%li}\n", i, i-k, i, i, k);
20 x[i] = x[i-(k/2)] + x[i];