pet_scop_from_pet_stmt: extract context constraints from statement expressions
[pet.git] / tests / matmul.scop
bloba504972ace4f9cffb35022509e740d50d1b04d64
1 context: '[N, K, M] -> {  : K >= 0 and N >= 0 and N <= 2147483647 and K <= 2147483647
2   and M <= 2147483647 and M >= -2147483648 }'
3 arrays:
4 - context: '[K] -> {  : K >= 0 }'
5   extent: '[N, K, M] -> { A[i0, i1] : i1 >= 0 and i0 >= 0 and i1 <= -1 + K }'
6   element_type: float
7 - context: '[N] -> {  : N >= 0 }'
8   extent: '[N, K, M] -> { B[i0, i1] : i1 >= 0 and i1 <= -1 + N and i0 >= 0 }'
9   element_type: float
10 - context: '[N] -> {  : N >= 0 }'
11   extent: '[N, K, M] -> { C[i0, i1] : i1 >= 0 and i1 <= -1 + N and i0 >= 0 }'
12   element_type: float
13   live_out: 1
14 statements:
15 - line: 9
16   domain: '[N, K, M] -> { S_0[i, j] : i >= 0 and i <= -1 + M and j >= 0 and j <= -1
17     + N }'
18   schedule: '[N, M] -> { S_0[i, j] -> [0, i, j, 0] }'
19   body:
20     type: binary
21     operation: =
22     arguments:
23     - type: access
24       relation: '[N, K, M] -> { S_0[i, j] -> C[i, j] }'
25       read: 0
26       write: 1
27     - type: access
28       relation: '[N, K, M] -> { S_0[i, j] -> [0] }'
29       read: 1
30       write: 0
31 - line: 11
32   domain: '[N, K, M] -> { S_1[i, j, k] : k >= 0 and j >= 0 and j <= -1 + N and k <=
33     -1 + K and i >= 0 and i <= -1 + M }'
34   schedule: '[K, N, M] -> { S_1[i, j, k] -> [0, i, j, 1, k] }'
35   body:
36     type: binary
37     operation: +=
38     arguments:
39     - type: access
40       relation: '[N, K, M] -> { S_1[i, j, k] -> C[i, j] }'
41       read: 1
42       write: 1
43     - type: binary
44       operation: '*'
45       arguments:
46       - type: access
47         relation: '[N, K, M] -> { S_1[i, j, k] -> A[i, k] }'
48         read: 1
49         write: 0
50       - type: access
51         relation: '[N, K, M] -> { S_1[i, j, k] -> B[k, j] }'
52         read: 1
53         write: 0