Task 6 and 7 are done!
This commit is contained in:
parent
2058f7ed6f
commit
87e1eb75d5
36 changed files with 883 additions and 21 deletions
|
@ -9,7 +9,7 @@ void init_vec_b(const double * restrict a, double * restrict b, int n)
|
|||
double sum = 0;
|
||||
|
||||
#pragma omp simd reduction(+:sum)
|
||||
for (int k = 1; k < n; k+=2)
|
||||
for (int k = 0; k < n; k+=2)
|
||||
sum += a[i * n + k];
|
||||
|
||||
b[i] = sum;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue