What are the loop carried dependencies in the this loop rewr
What are the loop carried dependencies in the this loop? rewrite it so that it is parallel.
for (i = 1; i<=99; i++) {
a[i] = b[i] + c[i]; /S1/
b[i] = a[i] + d[i]; /S2/
a[i+1] = a[i] + e[i]; /S3/
}
Solution
loop1: for (i = 1; i<=99; i++) {
a[i] = b[i] + c[i]; /S1/
}
loop2: for (i = 1; i<=99; i++) {
b[i] = a[i] + d[i]; /S2/
}
loop3: for (i = 1; i<=99; i++) {
a[i+1] = a[i] + e[i]; /S3/
}
![What are the loop carried dependencies in the this loop? rewrite it so that it is parallel. for (i = 1; i<=99; i++) { a[i] = b[i] + c[i]; /S1/ b[i] = a[i] + What are the loop carried dependencies in the this loop? rewrite it so that it is parallel. for (i = 1; i<=99; i++) { a[i] = b[i] + c[i]; /S1/ b[i] = a[i] +](/WebImages/24/what-are-the-loop-carried-dependencies-in-the-this-loop-rewr-1059107-1761552998-0.webp)