Question: Computer Architecture Question 1) Do the following loops have a loop-carried dependency? a) for (int i=0; i < 100; i++) { A[i] = B[2*i+4]; B[4*i+5]
Computer Architecture
Question 1) Do the following loops have a loop-carried dependency?
a) for (int i=0; i < 100; i++) {
A[i] = B[2*i+4];
B[4*i+5] = A[i];
}
b) Are there dependences between S1 and S2? Is this loop parallel? If not, show how to make it parallel.
for (i=0;i < 100;i++) {
A[i] = A[i] + B[i]; /* S1 */
B[i+1] = C[i] + D[i]; /* S2 */
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
