Question: 4. Assume that the following code segments are in parallel regions and there are 10 threads. Answer the associated questions after executing the following
4. Assume that the following code segments are in parallel regions and there are 10 threads. Answer the associated questions after executing the following code segment. Assume that .x is a private variable and y is a shared variable. 2 a) int x, y = 0; x= omp_get_thread_num(); #pragma omp critical 1 if (x > y) y =x; } What is the value of y? Answer:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
