pet_codegen.c: optionally take schedule tree as input
[pet.git] / tests / QR.scop
bloba6bf97cc6e2c34bbfcd932bb9b6ca0f6109e9ea1
1 start: 285
2 end: 840
3 indent: '    '
4 context: '[K, N] -> {  : K >= 100 and N <= 16 and N >= 8 and K <= 1000 }'
5 context_value: '[K, N] -> {  : K = 256 }'
6 schedule: '{ domain: "[N, K] -> { S_2[k, j] : k >= 0 and k <= -1 + K and j >= 0 and
7   j <= -1 + N; S_3[k, j, i] : k >= 0 and k <= -1 + K and j <= 2147483646 and j >=
8   0 and i >= 1 + j and i <= -1 + N; S_0[j, i] : j >= 0 and i >= j and i <= -1 + N;
9   S_1[k, j] : k >= 0 and k <= -1 + K and j >= 0 and j <= -1 + N; S_4[j, i] : j >=
10   0 and i >= j and i <= -1 + N }", child: { sequence: [ { filter: "[N, K] -> { S_0[j,
11   i] }", child: { schedule: "[N] -> L_0[{ S_0[j, i] -> [(j)] }]", child: { schedule:
12   "[N] -> L_1[{ S_0[j, i] -> [(i)] }]" } } }, { filter: "[N, K] -> { S_1[k, j] }",
13   child: { schedule: "[K, N] -> L_2[{ S_1[k, j] -> [(k)] }]", child: { schedule: "[K,
14   N] -> L_3[{ S_1[k, j] -> [(j)] }]" } } }, { filter: "[N, K] -> { S_2[k, j]; S_3[k,
15   j, i] }", child: { schedule: "[K, N] -> L_4[{ S_3[k, j, i] -> [(k)]; S_2[k, j] ->
16   [(k)] }]", child: { schedule: "[K, N] -> L_5[{ S_3[k, j, i] -> [(j)]; S_2[k, j]
17   -> [(j)] }]", child: { sequence: [ { filter: "[K, N] -> { S_2[k, j] }" }, { filter:
18   "[K, N] -> { S_3[k, j, i] }", child: { schedule: "[K, N] -> L_6[{ S_3[k, j, i] ->
19   [(i)] }]" } } ] } } } }, { filter: "[N, K] -> { S_4[j, i] }", child: { schedule:
20   "[N] -> L_7[{ S_4[j, i] -> [(j)] }]", child: { schedule: "[N] -> L_8[{ S_4[j, i]
21   -> [(i)] }]" } } } ] } }'
22 arrays:
23 - context: '[N] -> {  : N >= 0 }'
24   extent: '[N, K] -> { R[i0, i1] : i1 >= 0 and i1 <= -1 + N and i0 >= 0 and i0 <=
25     -1 + N }'
26   element_type: int
27   element_size: 4
28 - context: '[N, K] -> {  : K >= 0 and N >= 0 }'
29   extent: '[N, K] -> { X[i0, i1] : i0 >= 0 and i0 <= -1 + K and i1 >= 0 and i1 <=
30     -1 + N }'
31   element_type: int
32   element_size: 4
33 - context: '{  :  }'
34   extent: '[N, K] -> { t[] }'
35   element_type: int
36   element_size: 4
37 statements:
38 - line: 19
39   domain: '[N, K] -> { S_0[j, i] : i >= j and i <= -1 + N and j >= 0 }'
40   body:
41     type: expression
42     expr:
43       type: op
44       operation: =
45       arguments:
46       - type: access
47         index: '[N, K] -> { S_0[j, i] -> R[(j), (i)] }'
48         reference: __pet_ref_0
49         read: 0
50         write: 1
51       - type: call
52         name: Zero
53 - line: 23
54   domain: '[N, K] -> { S_1[k, j] : k >= 0 and k <= -1 + K and j >= 0 and j <= -1 +
55     N }'
56   body:
57     type: expression
58     expr:
59       type: op
60       operation: =
61       arguments:
62       - type: access
63         index: '[N, K] -> { S_1[k, j] -> X[(k), (j)] }'
64         reference: __pet_ref_1
65         read: 0
66         write: 1
67       - type: call
68         name: ReadMatrix
69 - line: 27
70   domain: '[N, K] -> { S_2[k, j] : k >= 0 and k <= -1 + K and j >= 0 and j <= -1 +
71     N }'
72   body:
73     type: expression
74     expr:
75       type: call
76       name: Vectorize
77       arguments:
78       - type: access
79         index: '[N, K] -> { S_2[k, j] -> R[(j), (j)] }'
80         reference: __pet_ref_2
81         read: 1
82         write: 0
83       - type: access
84         index: '[N, K] -> { S_2[k, j] -> X[(k), (j)] }'
85         reference: __pet_ref_3
86         read: 1
87         write: 0
88       - type: op
89         operation: '&'
90         arguments:
91         - type: access
92           index: '[N, K] -> { S_2[k, j] -> R[(j), (j)] }'
93           reference: __pet_ref_4
94           read: 0
95           write: 1
96       - type: op
97         operation: '&'
98         arguments:
99         - type: access
100           index: '[N, K] -> { S_2[k, j] -> X[(k), (j)] }'
101           reference: __pet_ref_5
102           read: 0
103           write: 1
104       - type: op
105         operation: '&'
106         arguments:
107         - type: access
108           index: '[N, K] -> { S_2[k, j] -> t[] }'
109           reference: __pet_ref_6
110           read: 0
111           write: 1
112 - line: 29
113   domain: '[N, K] -> { S_3[k, j, i] : k <= -1 + K and i <= -1 + N and j >= 0 and i
114     >= 1 + j and k >= 0 }'
115   body:
116     type: expression
117     expr:
118       type: call
119       name: Rotate
120       arguments:
121       - type: access
122         index: '[N, K] -> { S_3[k, j, i] -> R[(j), (i)] }'
123         reference: __pet_ref_7
124         read: 1
125         write: 0
126       - type: access
127         index: '[N, K] -> { S_3[k, j, i] -> X[(k), (i)] }'
128         reference: __pet_ref_8
129         read: 1
130         write: 0
131       - type: access
132         index: '[N, K] -> { S_3[k, j, i] -> t[] }'
133         reference: __pet_ref_9
134         read: 1
135         write: 0
136       - type: op
137         operation: '&'
138         arguments:
139         - type: access
140           index: '[N, K] -> { S_3[k, j, i] -> R[(j), (i)] }'
141           reference: __pet_ref_10
142           read: 0
143           write: 1
144       - type: op
145         operation: '&'
146         arguments:
147         - type: access
148           index: '[N, K] -> { S_3[k, j, i] -> X[(k), (i)] }'
149           reference: __pet_ref_11
150           read: 0
151           write: 1
152       - type: op
153         operation: '&'
154         arguments:
155         - type: access
156           index: '[N, K] -> { S_3[k, j, i] -> t[] }'
157           reference: __pet_ref_12
158           read: 0
159           write: 1
160 - line: 34
161   domain: '[N, K] -> { S_4[j, i] : i >= j and i <= -1 + N and j >= 0 }'
162   body:
163     type: expression
164     expr:
165       type: call
166       name: WriteMatrix
167       arguments:
168       - type: access
169         index: '[N, K] -> { S_4[j, i] -> R[(j), (i)] }'
170         reference: __pet_ref_13
171         read: 1
172         write: 0