Module 17: Loops
  Lecture 33: Data Dependence in Parallel Loops
 


Additional Constraints

  • A solution must lie within limits of induction variable value
  • There must be an integer solution
  • Compiler may have to determine dependence distance or direction vector

Example:

Find out dependence eqn.
for I = 2, N
for J = 1, I
B[I,J] = B[I-1,J] + A[I]*C[J]
endfor
endfor

There are 2 eqns., one for each dimension