Download original image
Code Generation Approaches. This figure presents the result of different code generation approaches for the original situation depicted in part (a). The top of the figure shows the code’s iteration domain, where white points are executed while black points are not. Arrows represent the execution ordering. Under the iteration domain is a representation of the grid state. The approximation strategy is the following: in the black grid cell, no iteration is executed, in the grey grid cells, one iteration of the k-loop is executed and on the white grid cell, two iterations of the k-loop are executed. Parts (b), (c) and (d) show how the various approaches implement equivalent versions of the approximated code: with an internal guard for guarded, perfectly matching the situation for dynamically or on a grid-cell basis for statically.