Question: Normalized prex sum. Use OpenMP pragmas to parallelize this code as eciently as possible. The only modications you are allowed to make are the addition
Normalized prex sum. Use OpenMP pragmas to parallelize this code as eciently as possible. The only modications you are allowed to make are the addition of OpenMP pragmas. ! Note: values is a double array containing SIZE values.
double sum=0;
for (int i=0; i { sum += values[i]; } for (int i=1; i { values[i] = (values[i] + values[i-1]); } for (int i=0; i { values[i] /= sum; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
