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