limit parameters in context to possible values of corresponding variables
[pet.git] / tests / matmul.scop
blob89daf7ee835d50595054c5d7646c930bac4cd7f0
1 context: '[N, K] -> {  : K >= 0 and N >= 0 and N <= 2147483647 and K <= 2147483647
2   }'
3 arrays:
4 - context: '[K] -> {  : K >= 0 }'
5   extent: '[K] -> { A[i0, i1] : i0 >= 0 and i1 >= 0 and i1 <= -1 + K }'
6   element_type: float
7 - context: '[N] -> {  : N >= 0 }'
8   extent: '[N] -> { B[i0, i1] : i0 >= 0 and i1 >= 0 and i1 <= -1 + N }'
9   element_type: float
10 - context: '[N] -> {  : N >= 0 }'
11   extent: '[N] -> { C[i0, i1] : i0 >= 0 and i1 >= 0 and i1 <= -1 + N }'
12   element_type: float
13   live_out: 1
14 statements:
15 - line: 9
16   domain: '[N, K, M] -> { S_0[i, j] : j >= 0 and j <= -1 + N and i >= 0 and i <= -1
17     + M }'
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] : j <= -1 + N and k <= -1 + K and i >= 0 and
33     i <= -1 + M and k >= 0 and j >= 0 }'
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