add support for structs
[pet.git] / tests / struct5.scop
bloba5cff7045ea38c2f37ec5b75b81f193966e20fab
1 start: 77
2 end: 191
3 context: '{  :  }'
4 types:
5 - name: s
6   definition: "struct s {\n    struct f {\n        int a[10];\n    };\n    struct
7     f f[10];\n}"
8 arrays:
9 - context: '{  :  }'
10   extent: '{ s[] }'
11   element_type: struct s
12   element_size: 400
13   element_is_record: 1
14 - context: '{  :  }'
15   extent: '{ s_f[s[] -> f[i0]] : i0 >= 0 and i0 <= 9 }'
16   element_type: <subfield>
17   element_size: 40
18   element_is_record: 1
19 - context: '{  :  }'
20   extent: '{ s_f_a[s_f[s[] -> f[i0]] -> a[i1]] : i0 >= 0 and i0 <= 9 and i1 >= 0 and
21     i1 <= 9 }'
22   element_type: int
23   element_size: 4
24 statements:
25 - line: 14
26   domain: '{ S_0[i, j] : i >= 0 and i <= 9 and j >= 0 and j <= 9 }'
27   schedule: '{ S_0[i, j] -> [0, i, j] }'
28   body:
29     type: binary
30     operation: =
31     arguments:
32     - type: access
33       relation: '{ S_0[i, j] -> s_f_a[s_f[s[] -> f[i]] -> a[j]] }'
34       index: '{ S_0[i, j] -> s_f_a[s_f[s[] -> f[(i)]] -> a[(j)]] }'
35       reference: __pet_ref_0
36       read: 0
37       write: 1
38     - type: binary
39       operation: '*'
40       arguments:
41       - type: access
42         relation: '{ S_0[i, j] -> [i] }'
43         index: '{ S_0[i, j] -> [(i)] }'
44         reference: __pet_ref_1
45         read: 1
46         write: 0
47       - type: access
48         relation: '{ S_0[i, j] -> [j] }'
49         index: '{ S_0[i, j] -> [(j)] }'
50         reference: __pet_ref_2
51         read: 1
52         write: 0