chundoong-lab-ta/SHPC2022/hw3/prefix_sum/prefix_sum.c

16 lines
290 B
C

#include <immintrin.h>
#include <math.h>
void prefix_sum_sequential(double *out, const double *in, int N) {
out[0] = in[0];
for (int i = 1; i < N; ++i) {
out[i] = in[i] + out[i-1];
}
}
void prefix_sum_parallel(double *out, const double *in, int N) {
// TODO: FILL_IN_HERE
}