Question: for( i=0; i <511; i=i+1) { A[i] = A[i] + B[i]; /*S1*/ B[i+1] = C[i] + D[i]; /*S2*/ } Determine the loop-carried (inter-iteration) dependencies. Is

for( i=0; i<511; i=i+1)

{

A[i] = A[i] + B[i]; /*S1*/

B[i+1] = C[i] + D[i]; /*S2*/

}

  1. Determine the loop-carried (inter-iteration) dependencies.

  2. Is it parallel? Why?

  3. If not, can you rewrite to make it parallel? How?

  4. How long will it take to execute this loop on a 16-way processor?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!