Foreach of the followingtwocode segments,decide whether it issuitableforparallel executionandresponse according to yourjustification:addOpenMP pragmastomakethe loopparallelorbrieflyexplainwhy thecode segmentisnotsuitableforparallel execution.
(A): for ( i = 0; i < n;="" i++="" )="">
x [ i ] = 3 * i + 5;
y [ i ] = log ( x [ i ] );
}
(B): x [ 0 ] = 1;
x [ 1 ] = 2;
for ( i = 2; i < n;="" i++="">
x [ i ] = x [ i – 1 ] * x [ i – 2 ] ;
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here