Download - HSR - Institutional Repository
Transcript
Parallator 1. Introduction Figure 1.9.: The programmer selects the bodies array and Convert To Parallel Array refactoring. ReLooper converts the sequential loops (left-hand side) into parallel loops (right-hand side) using the ParallelArray framework [DD12]. ReLooper uses a data-flow analysis that determines objects that are shared among loop iterations, and detects writes to the shared objects. This static analysis is based on the SSA (single static assignment) intermediate representation of a program and it analyzes both, the program in source code and in byte code. Additionally the data-flow analysis is conservative, it could give false warnings. Therefore it is crucial that the refactoring is interactive. The user as expert can decide whether to move on even though warnings exist. The decision to parallelize and ignore the warnings can be done for every loop in the example of figure 1.9. 1.6. Project Goals TBB provides a rich set of threading building blocks that help in parallelize sequential algorithms. They provide an abstraction to parallelize operations on loop elements with different kind of dependencies. A manual conversion of the loops into parallelized TBB calls is time consuming, error prone and enforces advanced knowledge as of the following reasons: Finding loops that provide data or task parallelism is difficult. It requires a conscious analysis of the code. The manual transformation to parallelism can introduce errors. Especially if knowledge of lambda expressions and functors is not well-founded. Whether to pass a Page 22 of 99