]> git.somenet.org - pub/astra/parallel.git/blob - openmp/prefix/seq.c
hillis: implemented partial prefix sums algorithm
[pub/astra/parallel.git] / openmp / prefix / seq.c
1
2 #include "seq.h"
3 /**
4  * Sequential algorithm to compute correct values.
5  */
6 void algorithm (numtype in[], unsigned long size, unsigned int ops[]) {
7         for (unsigned long i = 1; i <= size; i++){
8                 in[i] = in[(i-1)] + in[i];
9         }
10 }