use the clang driver to obtain command line arguments for the clang frontend
[pet.git] / tests / conditional_assignment.scop
blob0df6411492318fde4915ee2caf6f5c98f988b0d2
1 context: '[N, M] -> {  : N >= 0 and M >= 0 }'
2 arrays:
3 - context: '[M, N] -> {  : N >= 0 and M >= 0 }'
4   extent: '[N, M] -> { in1[i0, i1] : i0 >= 0 and i1 >= 0 and i0 <= -1 + N and i1 <=
5     -1 + M }'
6   element_type: int
7 - context: '[N] -> {  : N >= 0 }'
8   extent: '[N] -> { in2[i0] : i0 >= 0 and i0 <= -1 + N }'
9   value_bounds: '{ [i0] : i0 >= -1 and i0 <= 1 }'
10   element_type: int
11 - context: '[N] -> {  : N >= 0 }'
12   extent: '[N] -> { A[i0, i1] : i0 >= 0 and i1 >= 0 and i0 <= -1 + N and i1 <= 9 }'
13   element_type: int
14 - context: '[N] -> {  : N >= 0 }'
15   extent: '[N] -> { C[i0] : i0 >= 0 and i0 <= -1 + N }'
16   element_type: int
17 - context: '{  :  }'
18   extent: '{ m[] }'
19   element_type: int
20 statements:
21 - line: 21
22   domain: '[N] -> { S_0[i] : i >= 0 and i <= -1 + N }'
23   schedule: '[N] -> { S_0[i] -> [0, i, 0] }'
24   body:
25     type: binary
26     operation: =
27     arguments:
28     - type: access
29       relation: '[N] -> { S_0[i] -> m[] }'
30       read: 0
31       write: 1
32     - type: binary
33       operation: +
34       arguments:
35       - type: access
36         relation: '[N] -> { S_0[i] -> [i] }'
37         read: 1
38         write: 0
39       - type: access
40         relation: '[N] -> { S_0[i] -> [1] }'
41         read: 1
42         write: 0
43 - line: 23
44   domain: '[M, N] -> { S_1[i, j] : i >= 0 and i <= -1 + N and j >= 0 and j <= -1 +
45     M }'
46   schedule: '[M, N] -> { S_1[i, j] -> [0, i, 1, j] }'
47   body:
48     type: binary
49     operation: =
50     arguments:
51     - type: access
52       relation: '[M, N] -> { S_1[i, j] -> m[] }'
53       read: 0
54       write: 1
55     - type: call
56       name: g
57       arguments:
58       - type: call
59         name: h
60         arguments:
61         - type: access
62           relation: '[M, N] -> { S_1[i, j] -> m[] }'
63           read: 1
64           write: 0
65       - type: access
66         relation: '[M, N] -> { S_1[i, j] -> in1[i, j] }'
67         read: 1
68         write: 0
69 - line: 24
70   domain: '[N] -> { S_2[i] : i >= 0 and i <= -1 + N }'
71   schedule: '[N] -> { S_2[i] -> [0, i, 2] }'
72   body:
73     type: call
74     name: compute_row
75     arguments:
76     - type: call
77       name: h
78       arguments:
79       - type: access
80         relation: '[N] -> { S_2[i] -> m[] }'
81         read: 1
82         write: 0
83     - type: access
84       relation: '[N] -> { S_2[i] -> A[i, o1] }'
85       read: 0
86       write: 1
87 - line: 26
88   domain: '{ S_3[] }'
89   schedule: '{ S_3[] -> [1] }'
90   body:
91     type: binary
92     operation: =
93     arguments:
94     - type: access
95       relation: '{ S_3[] -> A[5, 6] }'
96       read: 0
97       write: 1
98     - type: access
99       relation: '{ S_3[] -> [0] }'
100       read: 1
101       write: 0
102 - line: 28
103   domain: '[N] -> { S_4[i] : i >= 0 and i <= -1 + N }'
104   schedule: '[N] -> { S_4[i] -> [2, i] }'
105   body:
106     type: binary
107     operation: =
108     arguments:
109     - type: access
110       relation: '[N] -> { S_4[i] -> C[i] }'
111       read: 0
112       write: 1
113     - type: ternary
114       arguments:
115       - type: access
116         relation: '[N] -> { [S_4[i] -> [i1]] -> [1] : i1 >= -i and i1 <= -1 + N -
117           i; [S_4[i] -> [i1]] -> [0] : i1 <= -1 - i or (i1 >= -i and i1 >= N - i)
118           }'
119         read: 1
120         write: 0
121         arguments:
122         - type: access
123           relation: '[N] -> { S_4[i] -> in2[i] }'
124           read: 1
125           write: 0
126       - type: call
127         name: f
128         arguments:
129         - type: access
130           relation: '[N] -> { [S_4[i] -> [i1]] -> A[i + i1, o1] : i1 >= -i and i1
131             <= -1 + N - i }'
132           read: 1
133           write: 0
134           arguments:
135           - type: access
136             relation: '[N] -> { S_4[i] -> in2[i] }'
137             read: 1
138             write: 0
139       - type: access
140         relation: '[N] -> { [S_4[i] -> [i1]] -> [0] : i1 <= -1 - i or (i1 >= -i and
141           i1 >= N - i) }'
142         read: 1
143         write: 0
144         arguments:
145         - type: access
146           relation: '[N] -> { S_4[i] -> in2[i] }'
147           read: 1
148           write: 0