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