pet_stmt_embed: handle NULL stmt
[pet.git] / tests / QR.scop
blobc8ebd49209e74ae5b2426870db64727bfc40f527
1 context: '[N, K] -> {  : N >= 8 and N <= 16 and K >= 100 and K <= 1000 }'
2 arrays:
3 - context: '[N] -> {  : N >= 0 }'
4   extent: '[N] -> { R[i0, i1] : i0 >= 0 and i1 >= 0 and i0 <= -1 + N and i1 <= -1
5     + N }'
6   element_type: int
7 - context: '[N, K] -> {  : K >= 0 and N >= 0 }'
8   extent: '[K, N] -> { X[i0, i1] : i0 >= 0 and i1 >= 0 and i0 <= -1 + K and i1 <=
9     -1 + N }'
10   element_type: int
11 - context: '{  :  }'
12   extent: '{ t[] }'
13   element_type: int
14 statements:
15 - line: 19
16   domain: '[N] -> { S_0[j, i] : j >= 0 and j <= -1 + N and i >= j and i <= -1 + N
17     }'
18   schedule: '[N] -> { S_0[j, i] -> [0, j, i] }'
19   body:
20     type: binary
21     operation: =
22     arguments:
23     - type: access
24       relation: '[N] -> { S_0[j, i] -> R[j, i] }'
25       read: 0
26       write: 1
27     - type: call
28       name: Zero
29 - line: 23
30   domain: '[N, K] -> { S_1[k, j] : k >= 0 and k <= -1 + K and j >= 0 and j <= -1 +
31     N }'
32   schedule: '[N, K] -> { S_1[k, j] -> [1, k, j] }'
33   body:
34     type: binary
35     operation: =
36     arguments:
37     - type: access
38       relation: '[N, K] -> { S_1[k, j] -> X[k, j] }'
39       read: 0
40       write: 1
41     - type: call
42       name: ReadMatrix
43 - line: 27
44   domain: '[N, K] -> { S_2[k, j] : k >= 0 and k <= -1 + K and j >= 0 and j <= -1 +
45     N }'
46   schedule: '[N, K] -> { S_2[k, j] -> [2, k, j, 0] }'
47   body:
48     type: call
49     name: Vectorize
50     arguments:
51     - type: access
52       relation: '[N, K] -> { S_2[k, j] -> R[j, j] }'
53       read: 1
54       write: 0
55     - type: access
56       relation: '[N, K] -> { S_2[k, j] -> X[k, j] }'
57       read: 1
58       write: 0
59     - type: access
60       relation: '[N, K] -> { S_2[k, j] -> R[j, j] }'
61       read: 0
62       write: 1
63     - type: access
64       relation: '[N, K] -> { S_2[k, j] -> X[k, j] }'
65       read: 0
66       write: 1
67     - type: access
68       relation: '[N, K] -> { S_2[k, j] -> t[] }'
69       read: 0
70       write: 1
71 - line: 29
72   domain: '[N, K] -> { S_3[k, j, i] : k >= 0 and k <= -1 + K and j >= 0 and j <= -1
73     + N and i >= 1 + j and i <= -1 + N }'
74   schedule: '[N, K] -> { S_3[k, j, i] -> [2, k, j, 1, i] }'
75   body:
76     type: call
77     name: Rotate
78     arguments:
79     - type: access
80       relation: '[N, K] -> { S_3[k, j, i] -> R[j, i] }'
81       read: 1
82       write: 0
83     - type: access
84       relation: '[N, K] -> { S_3[k, j, i] -> X[k, i] }'
85       read: 1
86       write: 0
87     - type: access
88       relation: '[N, K] -> { S_3[k, j, i] -> t[] }'
89       read: 1
90       write: 0
91     - type: access
92       relation: '[N, K] -> { S_3[k, j, i] -> R[j, i] }'
93       read: 0
94       write: 1
95     - type: access
96       relation: '[N, K] -> { S_3[k, j, i] -> X[k, i] }'
97       read: 0
98       write: 1
99     - type: access
100       relation: '[N, K] -> { S_3[k, j, i] -> t[] }'
101       read: 0
102       write: 1
103 - line: 34
104   domain: '[N] -> { S_4[j, i] : j >= 0 and j <= -1 + N and i >= j and i <= -1 + N
105     }'
106   schedule: '[N] -> { S_4[j, i] -> [3, j, i] }'
107   body:
108     type: call
109     name: WriteMatrix
110     arguments:
111     - type: access
112       relation: '[N] -> { S_4[j, i] -> R[j, i] }'
113       read: 1
114       write: 0