This is an OpenMP question.
1. #pragma omp parallel2. {3.4. for (i = 1 ; i < m;="" i="" +="2">5. {6. D[i] = x * A[i] + x * B[i];7. }8.9. #pragma omp for10. 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 muchperformance as possible from the above code? There must not be a race condition.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here