This is an OpenMP question. 1. #pragma omp parallel 2. { 3. 4. for (i = 1 ; i


This is an OpenMP question.



1. #pragma omp parallel
2. {
3.
4. for (i = 1 ; i < m;="" i="" +="2">
5. {
6. D[i] = x * A[i] + x * B[i];
7. }
8.
9. #pragma omp for
10. for (i = 0; i < n;="">
11. {
12. C[i] = k * D[i];
13. }
14. } // end omp parallel



Assume M = 2N. What do we have to write in line 3 above to get as much
performance as possible from the above code? There must not be a race condition.



Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here