Loop-level parallelism: Difference between revisions

Content deleted Content added
Aishwinth (talk | contribs)
Ewhorton (talk | contribs)
Line 153:
 
=== DISTRIBUTED loop ===
When a loop has a loop-carried dependence, anotherone way to parallelize it is to distribute the loop into several different loops. Statements that are not dependent withon each other are separated so that these distributed loops can be executed in parallel. For example, consider the following code.
<syntaxhighlight>
for (int i = 1; i < n; i ++) {