#include "defs.h" double get_seconds() { struct timeval tp; gettimeofday(&tp, NULL); return (double) (tp.tv_sec + ((1e-6)*tp.tv_usec)); } void prefix_sums(LONG_T *input, LONG_T* result, LONG_T* p, LONG_T n) { LONG_T i; #ifdef _OPENMP LONG_T j, r, start, end, add_value; int tid, nthreads; tid = omp_get_thread_num(); nthreads = omp_get_num_threads(); r = n/nthreads; result[0] = 0; #pragma omp for for (i=1; i0) { add_value=p[tid-1]; for (j=start-1; j