scop.c: extract out expr_collect_access
[pet.git] / tests / matmul.scop
blob73c20c515581b3a45f5276754467dd8bf98d89d6
1 start: 95
2 end: 277
3 context: '[N, K, M] -> {  : K >= 0 and N >= 0 and N <= 2147483647 and K <= 2147483647
4   and M <= 2147483647 and M >= -2147483648 }'
5 arrays:
6 - context: '[K] -> {  : K >= 0 }'
7   extent: '[N, K, M] -> { A[i0, i1] : i1 >= 0 and i0 >= 0 and i1 <= -1 + K }'
8   element_type: float
9   element_size: 4
10 - context: '[N] -> {  : N >= 0 }'
11   extent: '[N, K, M] -> { B[i0, i1] : i1 >= 0 and i0 >= 0 and i1 <= -1 + N }'
12   element_type: float
13   element_size: 4
14 - context: '[N] -> {  : N >= 0 }'
15   extent: '[N, K, M] -> { C[i0, i1] : i1 >= 0 and i0 >= 0 and i1 <= -1 + N }'
16   element_type: float
17   element_size: 4
18   live_out: 1
19 statements:
20 - line: 9
21   domain: '[N, K, M] -> { S_0[i, j] : j <= -1 + N and j >= 0 and i <= -1 + M and i
22     >= 0 }'
23   schedule: '[N, M] -> { S_0[i, j] -> [0, i, j, 0] }'
24   body:
25     type: binary
26     operation: =
27     arguments:
28     - type: access
29       relation: '[N, K, M] -> { S_0[i, j] -> C[i, j] }'
30       index: '[N, K, M] -> { S_0[i, j] -> C[(i), (j)] }'
31       reference: __pet_ref_0
32       read: 0
33       write: 1
34     - type: access
35       relation: '[N, K, M] -> { S_0[i, j] -> [0] }'
36       index: '[N, K, M] -> { S_0[i, j] -> [(0)] }'
37       reference: __pet_ref_1
38       read: 1
39       write: 0
40 - line: 11
41   domain: '[N, K, M] -> { S_1[i, j, k] : k <= -1 + K and k >= 0 and j <= -1 + N and
42     j >= 0 and i <= -1 + M and i >= 0 }'
43   schedule: '[K, N, M] -> { S_1[i, j, k] -> [0, i, j, 1, k] }'
44   body:
45     type: binary
46     operation: +=
47     arguments:
48     - type: access
49       relation: '[N, K, M] -> { S_1[i, j, k] -> C[i, j] }'
50       index: '[N, K, M] -> { S_1[i, j, k] -> C[(i), (j)] }'
51       reference: __pet_ref_2
52       read: 1
53       write: 1
54     - type: binary
55       operation: '*'
56       arguments:
57       - type: access
58         relation: '[N, K, M] -> { S_1[i, j, k] -> A[i, k] }'
59         index: '[N, K, M] -> { S_1[i, j, k] -> A[(i), (k)] }'
60         reference: __pet_ref_3
61         read: 1
62         write: 0
63       - type: access
64         relation: '[N, K, M] -> { S_1[i, j, k] -> B[k, j] }'
65         index: '[N, K, M] -> { S_1[i, j, k] -> B[(k), (j)] }'
66         reference: __pet_ref_4
67         read: 1
68         write: 0