Loop-level parallelism: Difference between revisions

Content deleted Content added
Ewhorton (talk | contribs)
Ewhorton (talk | contribs)
Line 28:
== Dependencies in code ==
 
Transforming a sequential program into a parallel version requires that [[Data dependency|dependencies]] within the code are preserved. There are several types of dependenciesdependences that can be found: within code.<ref name="Solihin">{{cite book|last1=Solihin|first1=Yan|title=Fundamentals of Parallel Architecture|date=2016|publisher=CRC Press|___location=Boca Raton, FL|isbn=978-1-4822-1118-4}}</ref><ref>{{cite journal|last1=Goff|first1=Gina|title=Practical dependence testing|journal=SIGPLAN|url=http://delivery.acm.org/10.1145/120000/113448/p15-goff.pdf?ip=152.7.224.7&id=113448&acc=ACTIVE%20SERVICE&key=6ABC8B4C00F6EE47%2E4D4702B0C3E38B35%2E4D4702B0C3E38B35%2E4D4702B0C3E38B35&CFID=667494229&CFTOKEN=16697834&__acm__=1473798493_e58dcb18e741b6e6ac1c1c728fc5508d|accessdate=13 September 2016}}</ref>
 
{| class="wikitable"
Line 53:
|}
 
In order to preserve the sequential behavior of a loop when run in parallel, True Dependence must be preserved. Anti-Dependence and Output Dependence can be dealt with by giving each process or thread its own copy of variables (known as privatization). However, true dependence must be preserved, requiring process synchronization.<ref name="Solihin" />
 
=== Example of True Dependence ===