2 # Example 1 in "Generating Efficient Tiled Code for Distributed Memory
3 # Machines", Peiyi Tang and Jingling Xue.
6 # for (int i = 1; i <= 9; i++) {
7 # for (int j = 1; j <= 4; j++) {
8 # A[i,2*j] = A[i,2*j-2] + A[i-1,2*j-2];
12 # We tile it with a tiling matrix H = [1/2 0]
17 # for (int i = 0; i <= 9; i += 2) {
18 # for (int j = max(-1, -9 + i); j <= min(4, 3 + i); j++) {
19 # for (int k = max(1, i, i-j); k <= min(4 + i -j, 1 + i, 9); k++) {
20 # for (int l = max(-i + j + k, 1); l <= min(4, 1 -i + j + k); l++) {
22 # if ((i + j) % 2 == 0) {
23 # A[k, 2 * l] = A[k, -2 + 2 * l] + A[-1 + k, -2 + 2 * l];
41 1 # number of statements
67 # Scattering functions
69 # alpha=[2i, 2i+2j, 2i+k, 2i+2j+l] gamma=[0, 0, 0, 0] beta=[0, 0, 0, 0, 0, 0]
70 # c1 c2 c3 c4 c5 c6 c7 c8 c9 i j k l 1
71 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0
72 0 0 -1 0 0 0 0 0 0 0 2 0 0 0 0
73 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0
74 0 0 0 0 -1 0 0 0 0 0 2 2 0 0 0
75 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0
76 0 0 0 0 0 0 -1 0 0 0 2 0 1 0 0
77 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0
78 0 0 0 0 0 0 0 0 -1 0 2 2 0 1 0
79 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0