| | 90 | |
| | 91 | == Notes == |
| | 92 | * Currently, the simplifier is not aware of the cases that out-of-bound access on multiple dimensional arrays can raise data race. For example, |
| | 93 | {{{ |
| | 94 | int a[10][5]; |
| | 95 | #pragma omp parallel for |
| | 96 | for (int i = 0; i < 5; i++) |
| | 97 | for (int j = 1; j < 10; j++) |
| | 98 | a[i][j] = a[i][j-1] // a[0][4] and a[1][-1] refer to the same element |
| | 99 | }}} |
| | 100 | |
| | 101 | The current simplifier will incorrectly sequentialize the example above without realizing the fact that this example is sequentializable if and only if no "logical" out-of-bound happens during the execution. |
| | 102 | A fix for the simplifier could be sequentializing the example with inserted assertion for making sure that there is no "logical" out-of-bound error. |