pet_scop: keep track of schedule tree
[pet.git] / tests / conditional_assignment2.scop
blob97605e72b55e57f6f719c98261a9e2ca438e0735
1 start: 225
2 end: 507
3 indent: "\t"
4 context: '[M, N] -> {  : N >= 0 and M >= 0 and M <= 2147483647 and N <= 2147483647
5   }'
6 schedule: '{ domain: "[N, M] -> { S_4[]; S_2[i, j] : i >= 0 and i <= -1 + N and j
7   >= 0 and j <= -1 + M; S_3[i] : i >= 0 and i <= -1 + N; S_0[]; S_1[i] : i >= 0 and
8   i <= -1 + N; S_5[i] : i >= 0 and i <= -1 + N }", child: { sequence: [ { filter:
9   "[N, M] -> { S_0[] }" }, { filter: "[N, M] -> { S_2[i, j]; S_3[i]; S_1[i] }", child:
10   { schedule: "[N, M] -> L_0[{ S_1[i] -> [(i)]; S_3[i] -> [(i)]; S_2[i, j] -> [(i)]
11   }]", child: { sequence: [ { filter: "[N, M] -> { S_1[i] }" }, { filter: "[N, M]
12   -> { S_2[i, j] }", child: { schedule: "[N, M] -> L_1[{ S_2[i, j] -> [(j)] }]" }
13   }, { filter: "[N, M] -> { S_3[i] }" } ] } } }, { filter: "[N, M] -> { S_4[] }" },
14   { filter: "[N, M] -> { S_5[i] }", child: { schedule: "[N] -> L_2[{ S_5[i] -> [(i)]
15   }]" } } ] } }'
16 arrays:
17 - context: '[N] -> {  : N >= 0 }'
18   extent: '[M, N] -> { A[i0, i1] : i1 <= 9 and i1 >= 0 and i0 >= 0 and i0 <= -1 +
19     N }'
20   element_type: int
21   element_size: 4
22 - context: '[N] -> {  : N >= 0 }'
23   extent: '[M, N] -> { C[i0] : i0 >= 0 and i0 <= -1 + N }'
24   element_type: int
25   element_size: 4
26 - context: '[M, N] -> {  : N >= 0 and M >= 0 }'
27   extent: '[M, N] -> { in1[i0, i1] : i0 >= 0 and i0 <= -1 + N and i1 >= 0 and i1 <=
28     -1 + M }'
29   element_type: int
30   element_size: 4
31 - context: '{  :  }'
32   extent: '[M, N] -> { in2[] }'
33   value_bounds: '{ [i0] : i0 >= -1 and i0 <= 1 }'
34   element_type: int
35   element_size: 4
36 - context: '{  :  }'
37   extent: '[M, N] -> { m[] }'
38   element_type: int
39   element_size: 4
40 statements:
41 - line: 21
42   domain: '[M, N] -> { S_0[] }'
43   schedule: '{ S_0[] -> [0] }'
44   body:
45     type: expression
46     expr:
47       type: op
48       operation: =
49       arguments:
50       - type: access
51         index: '[M, N] -> { S_0[] -> in2[] }'
52         reference: __pet_ref_0
53         read: 0
54         write: 1
55       - type: call
56         name: g2
57 - line: 23
58   domain: '[M, N] -> { S_1[i] : i >= 0 and i <= -1 + N }'
59   schedule: '[N] -> { S_1[i] -> [1, i, 0] }'
60   body:
61     type: expression
62     expr:
63       type: op
64       operation: =
65       arguments:
66       - type: access
67         index: '[M, N] -> { S_1[i] -> m[] }'
68         reference: __pet_ref_1
69         read: 0
70         write: 1
71       - type: op
72         operation: +
73         arguments:
74         - type: access
75           index: '[M, N] -> { S_1[i] -> [(i)] }'
76           reference: __pet_ref_2
77           read: 1
78           write: 0
79         - type: int
80           value: 1
81 - line: 25
82   domain: '[M, N] -> { S_2[i, j] : i >= 0 and i <= -1 + N and j >= 0 and j <= -1 +
83     M }'
84   schedule: '[N, M] -> { S_2[i, j] -> [1, i, 1, j] }'
85   body:
86     type: expression
87     expr:
88       type: op
89       operation: =
90       arguments:
91       - type: access
92         index: '[M, N] -> { S_2[i, j] -> m[] }'
93         reference: __pet_ref_3
94         read: 0
95         write: 1
96       - type: call
97         name: g
98         arguments:
99         - type: call
100           name: h
101           arguments:
102           - type: access
103             index: '[M, N] -> { S_2[i, j] -> m[] }'
104             reference: __pet_ref_4
105             read: 1
106             write: 0
107         - type: access
108           index: '[M, N] -> { S_2[i, j] -> in1[(i), (j)] }'
109           reference: __pet_ref_5
110           read: 1
111           write: 0
112 - line: 26
113   domain: '[M, N] -> { S_3[i] : i >= 0 and i <= -1 + N }'
114   schedule: '[N] -> { S_3[i] -> [1, i, 2] }'
115   body:
116     type: expression
117     expr:
118       type: call
119       name: compute_row
120       arguments:
121       - type: call
122         name: h
123         arguments:
124         - type: access
125           index: '[M, N] -> { S_3[i] -> m[] }'
126           reference: __pet_ref_6
127           read: 1
128           write: 0
129       - type: access
130         index: '[M, N] -> { S_3[i] -> A[(i)] }'
131         depth: 2
132         reference: __pet_ref_7
133         read: 0
134         write: 1
135 - line: 28
136   domain: '[M, N] -> { S_4[] }'
137   schedule: '{ S_4[] -> [2] }'
138   body:
139     type: expression
140     expr:
141       type: op
142       operation: =
143       arguments:
144       - type: access
145         index: '[M, N] -> { S_4[] -> A[(5), (6)] }'
146         reference: __pet_ref_8
147         read: 0
148         write: 1
149       - type: int
150         value: 0
151 - line: 30
152   domain: '[M, N] -> { S_5[i] : i >= 0 and i <= -1 + N }'
153   schedule: '[N] -> { S_5[i] -> [3, i] }'
154   body:
155     type: expression
156     expr:
157       type: op
158       operation: =
159       arguments:
160       - type: access
161         index: '[M, N] -> { S_5[i] -> C[(i)] }'
162         reference: __pet_ref_9
163         read: 0
164         write: 1
165       - type: op
166         operation: '?:'
167         arguments:
168         - type: access
169           index: '[M, N] -> { [S_5[i] -> [i1]] -> [((1) : i1 >= -i and i1 <= -1 +
170             N - i; (0) : i = -1 + N and i1 = 1; (0) : i = 0 and i1 = -1)] }'
171           reference: __pet_ref_11
172           read: 1
173           write: 0
174           arguments:
175           - type: access
176             index: '[M, N] -> { S_5[i] -> in2[] }'
177             reference: __pet_ref_10
178             read: 1
179             write: 0
180         - type: call
181           name: f
182           arguments:
183           - type: access
184             may_read: '[M, N] -> { [S_5[i] -> [i1]] -> A[i + i1, o1] : i1 >= -i and
185               i1 <= -1 + N - i }'
186             index: '[M, N] -> { [S_5[i] -> [i1]] -> A[((i + i1) : i1 >= -i)] }'
187             depth: 2
188             reference: __pet_ref_13
189             read: 1
190             write: 0
191             arguments:
192             - type: access
193               may_read: '[M, N] -> { S_5[i] -> in2[] }'
194               index: '[M, N] -> { S_5[i] -> in2[] }'
195               reference: __pet_ref_12
196               read: 1
197               write: 0
198         - type: int
199           value: 0