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