>
|
|
>
|
|
This first problem considers dependence anaysis in Cholesky's LU algorithm. See the image below, taken from William Pugh's paper on Presburger arithmetic. One objective of this problem is to decide whether the studied code can be parallelized. This is achieved by checking whether the same memory location is accessed by two statements (or more), at least once while writing.
For example, is there an an array slot read by Line 5 at some iteration before being written in Line 6 at some iteration . Answering this particular question is done by solving for the integer solutions of a system of linear equations and inequalities. Three cases need to be distinguished: (1) , (2) and , and (3) and .
The system below corresponds to the first case. The other two cases are treated similarly.
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
We apply IntegerPointDecomposition. Since no integer points are found, we deduce that there are no dependencies.
>
|
|
The second problem considers memory accesses by a for-loop nest. See the image below, taken from William Pugh's paper on Presburger arithmetic.
One objective of this problem is to describe analytically the set of accessed memory locations as a function of the loop bound . Describing this set is done by setting up a system of linear equations and inequalities and eliminating the intermediate (and unnecessary) variables. In the system below those intermediate variables (to be eliminated) are , whereas are seen as parameters.
>
|
|
| (4) |
>
|
|
| |
| (5) |
>
|
|
Applying IntegerPointDecomposition we obtain necessary and sufficient constraints for the system to have integer solutions.
>
|
|
| (6) |
Those constraints form the desired answer. We note that they define a Z-polyhedral set, which is two-dimensional in the variables and , as well as parametric in .
>
|
|
| (7) |