add support for structs
[pet.git] / tests / struct3.scop
blobd4e6b1e7bea440f29ff3d777c3ba95aed0eacc9d
1 start: 66
2 end: 259
3 context: '{  :  }'
4 types:
5 - name: s
6   definition: "struct s {\n    int a[30][40];\n}"
7 arrays:
8 - context: '{  :  }'
9   extent: '{ s[i0, i1] : i0 >= 0 and i1 >= 0 and i0 <= 9 and i1 <= 19 }'
10   element_type: struct s
11   element_size: 4800
12   element_is_record: 1
13 - context: '{  :  }'
14   extent: '{ s_a[s[i0, i1] -> a[i2, i3]] : i0 >= 0 and i1 >= 0 and i0 <= 9 and i1
15     <= 19 and i2 >= 0 and i3 >= 0 and i2 <= 29 and i3 <= 39 }'
16   element_type: int
17   element_size: 4
18 statements:
19 - line: 14
20   domain: '{ S_0[i, j, k, l] : i >= 0 and i <= 9 and j >= 0 and j <= 19 and k >= 0
21     and k <= 29 and l >= 0 and l <= 39 }'
22   schedule: '{ S_0[i, j, k, l] -> [0, i, j, k, l] }'
23   body:
24     type: binary
25     operation: =
26     arguments:
27     - type: access
28       relation: '{ S_0[i, j, k, l] -> s_a[s[i, j] -> a[k, l]] }'
29       index: '{ S_0[i, j, k, l] -> s_a[s[(i), (j)] -> a[(k), (l)]] }'
30       reference: __pet_ref_0
31       read: 0
32       write: 1
33     - type: binary
34       operation: +
35       arguments:
36       - type: binary
37         operation: +
38         arguments:
39         - type: binary
40           operation: +
41           arguments:
42           - type: access
43             relation: '{ S_0[i, j, k, l] -> [i] }'
44             index: '{ S_0[i, j, k, l] -> [(i)] }'
45             reference: __pet_ref_1
46             read: 1
47             write: 0
48           - type: access
49             relation: '{ S_0[i, j, k, l] -> [j] }'
50             index: '{ S_0[i, j, k, l] -> [(j)] }'
51             reference: __pet_ref_2
52             read: 1
53             write: 0
54         - type: access
55           relation: '{ S_0[i, j, k, l] -> [k] }'
56           index: '{ S_0[i, j, k, l] -> [(k)] }'
57           reference: __pet_ref_3
58           read: 1
59           write: 0
60       - type: access
61         relation: '{ S_0[i, j, k, l] -> [l] }'
62         index: '{ S_0[i, j, k, l] -> [(l)] }'
63         reference: __pet_ref_4
64         read: 1
65         write: 0