next up previous
Next: Barrier Minimization Up: Synchronization Graphs Previous: Influence of owner

Conditionals

Control dependences arising due to conditionals (and loops) are not included in the synchronization graph, since they are by definition intra thread dependences and are automatically obeyed. Consider the following example:

 
 par (I)

{

a[i] = ...; /* s1 */

if (c[f(i)]){ /* s2 */

.. = a[g(i)]; /* s3 */

}

}

Statement s3 is control dependent on s2. However, for all i, thread i of the statement always executes before , hence there is no need for the control dependence in the synchronization graph. The only other point of note in conditionals is that the body of the conditional needs to be split at points where dependence arcs originate and terminate so that global (and other) synchronizations may be inserted.



next up previous
Next: Barrier Minimization Up: Synchronization Graphs Previous: Influence of owner



Andy Kahn
Wed Jun 25 20:28:02 PDT 1997