2022-10-18 20:27:08 +09:00
|
|
|
#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) {
|
2022-10-20 10:43:49 +09:00
|
|
|
out[i] = in[i] + out[i - 1];
|
2022-10-18 20:27:08 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void prefix_sum_parallel(double *out, const double *in, int N) {
|
|
|
|
|
|
|
|
// TODO: FILL_IN_HERE
|
|
|
|
}
|