scop.c: expr_embed: use pet_expr_foreach_access_expr
[pet.git] / tests / ternary.scop
blobc8a26757d23424690fb3ff75a94a42c0d4bc2bfb
1 context: '{  :  }'
2 arrays:
3 - context: '{  :  }'
4   extent: '{ j[] }'
5   element_type: int
6   element_size: 4
7 - context: '{  :  }'
8   extent: '{ a[i0] : i0 >= 0 and i0 <= 99 }'
9   element_type: int
10   element_size: 4
11 statements:
12 - line: 9
13   domain: '{ S_0[i] : i >= 0 and i <= 99 }'
14   schedule: '{ S_0[i] -> [0, i, 0] }'
15   body:
16     type: binary
17     operation: =
18     arguments:
19     - type: access
20       relation: '{ S_0[i] -> j[] }'
21       read: 0
22       write: 1
23     - type: call
24       name: f
25 - line: 10
26   domain: '{ S_1[i] : i >= 0 and i <= 99 }'
27   schedule: '{ S_1[i] -> [0, i, 1] }'
28   body:
29     type: binary
30     operation: =
31     arguments:
32     - type: access
33       relation: '{ S_1[i] -> a[i] }'
34       read: 0
35       write: 1
36     - type: ternary
37       arguments:
38       - type: access
39         relation: '{ S_1[i] -> j[] }'
40         read: 1
41         write: 0
42       - type: access
43         relation: '{ S_1[i] -> [40] }'
44         read: 1
45         write: 0
46       - type: access
47         relation: '{ S_1[i] -> [90] }'
48         read: 1
49         write: 0