Task 6 was fixed and Task 8 was done
This commit is contained in:
parent
863948011f
commit
0a8c75a0cf
45 changed files with 1294 additions and 241 deletions
|
@ -63,7 +63,7 @@ double get_r2_value(const double * restrict x_k, int n)
|
|||
#pragma omp parallel for reduction(+:total_diff, template_sum)
|
||||
for (int i = 0; i < n; ++i)
|
||||
{
|
||||
short int modi = i ^ 1;
|
||||
short int modi = !(i & 1);
|
||||
total_diff += fabs(x_k[i] - modi);
|
||||
template_sum += modi;
|
||||
}
|
||||
|
@ -71,4 +71,3 @@ double get_r2_value(const double * restrict x_k, int n)
|
|||
relative_error = total_diff / template_sum;
|
||||
return relative_error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue