Support for scattering relation unions
[clay.git] / tests / unitary / datacopy.c.orig.scop
blob16049070a9b2c9081876ef601056c2e461d639e4
1 [Clan] Info: parsing file #1 (./unitary/datacopy.c)
2 #                                                     
3 #          <|                                         
4 #           A                                         
5 #          /.\                                       
6 #     <|  [""M#                                     
7 #      A   | #            Clan McCloog Castle         
8 #     /.\ [""M#           [Generated by Clan 0.7.1]
9 #    [""M# | #  U"U#U                              
10 #     | #  | #  \ .:/                                
11 #     | #  | #___| #                                  
12 #     | "--'     .-"                                
13 #   |"-"-"-"-"-#-#-##                            
14 #   |     # ## ######                                 
15 #    \       .::::'/                                 
16 #     \      ::::'/                                  
17 #   :8a|    # # ##                                    
18 #   ::88a      ###                                    
19 #  ::::888a  8a ##::.                                 
20 #  ::::::888a88a[]::::                                
21 # :::::::::SUNDOGa8a::::. ..                          
22 # :::::8::::888:Y8888:::::::::...                     
23 #::':::88::::888::Y88a______________________________________________________
24 #:: ::::88a::::88a:Y88a                                  __---__-- __
25 #' .: ::Y88a:::::8a:Y88a                            __----_-- -------_-__
26 #  :' ::::8P::::::::::88aa.                   _ _- --  --_ --- __  --- __--
27 #.::  :::::::::::::::::::Y88as88a...s88aa.
29 # [File generated by the OpenScop Library 0.8.4]
31 <OpenScop>
33 # =============================================== Global
34 # Language
37 # Context
38 CONTEXT
39 0 4 0 0 0 2
41 # Parameters are provided
43 <strings>
44 N M
45 </strings>
47 # Number of statements
50 # =============================================== Statement 1
51 # Number of relations describing the statement:
54 # ----------------------------------------------  1.1 Domain
55 DOMAIN
56 6 6 2 0 0 2
57 # e/i|  i    j |  N    M |  1  
58    1    1    0    0    0    0    ## i >= 0
59    1   -1    0    1    0    0    ## -i+N >= 0
60    1    0    0    1    0    0    ## N >= 0
61    1    0    1    0    0    0    ## j >= 0
62    1    0   -1    0    1    0    ## -j+M >= 0
63    1    0    0    0    1    0    ## M >= 0
65 # ----------------------------------------------  1.2 Scattering
66 SCATTERING
67 5 11 5 2 0 2
68 # e/i| c1   c2   c3   c4   c5 |  i    j |  N    M |  1  
69    0   -1    0    0    0    0    0    0    0    0    0    ## c1 == 0
70    0    0   -1    0    0    0    1    0    0    0    0    ## c2 == i
71    0    0    0   -1    0    0    0    0    0    0    0    ## c3 == 0
72    0    0    0    0   -1    0    0    1    0    0    0    ## c4 == j
73    0    0    0    0    0   -1    0    0    0    0    0    ## c5 == 0
75 # ----------------------------------------------  1.3 Access
76 READ
77 3 9 3 2 0 2
78 # e/i| Arr  [1]  [2]|  i    j |  N    M |  1  
79    0   -1    0    0    0    0    0    0    5    ## Arr == a
80    0    0   -1    0    0    1    0    0    0    ## [1] == j
81    0    0    0   -1    1    0    0    0    0    ## [2] == i
83 WRITE
84 3 9 3 2 0 2
85 # e/i| Arr  [1]  [2]|  i    j |  N    M |  1  
86    0   -1    0    0    0    0    0    0    5    ## Arr == a
87    0    0   -1    0    0    1    0    0    0    ## [1] == j
88    0    0    0   -1    1    0    0    0    0    ## [2] == i
90 # ----------------------------------------------  1.4 Statement Extensions
91 # Number of Statement Extensions
93 <body>
94 # Number of original iterators
96 # List of original iterators
97 i j
98 # Statement body expression
99 a[j][i]++;
100 </body>
102 <extbody>
103 # Number of accesses
105 # Access coordinates (start/length)
106 -1 -1
107 0 7
108 # Number of original iterators
110 # List of original iterators
111 i j
112 # Statement body expression
113 a[j][i]++;
114 </extbody>
116 # =============================================== Statement 2
117 # Number of relations describing the statement:
120 # ----------------------------------------------  2.1 Domain
121 DOMAIN
122 6 6 2 0 0 2
123 # e/i|  i    j |  N    M |  1  
124    1    1    0    0    0    0    ## i >= 0
125    1   -1    0    1    0    0    ## -i+N >= 0
126    1    0    0    1    0    0    ## N >= 0
127    1    0    1    0    0    0    ## j >= 0
128    1    0   -1    0    1    0    ## -j+M >= 0
129    1    0    0    0    1    0    ## M >= 0
131 # ----------------------------------------------  2.2 Scattering
132 SCATTERING
133 5 11 5 2 0 2
134 # e/i| c1   c2   c3   c4   c5 |  i    j |  N    M |  1  
135    0   -1    0    0    0    0    0    0    0    0    0    ## c1 == 0
136    0    0   -1    0    0    0    1    0    0    0    0    ## c2 == i
137    0    0    0   -1    0    0    0    0    0    0    0    ## c3 == 0
138    0    0    0    0   -1    0    0    1    0    0    0    ## c4 == j
139    0    0    0    0    0   -1    0    0    0    0    1    ## c5 == 1
141 # ----------------------------------------------  2.3 Access
142 WRITE
143 3 9 3 2 0 2
144 # e/i| Arr  [1]  [2]|  i    j |  N    M |  1  
145    0   -1    0    0    0    0    0    0    6    ## Arr == b
146    0    0   -1    0    0    1    0    0    0    ## [1] == j
147    0    0    0   -1    1    0    0    0    0    ## [2] == i
149 # ----------------------------------------------  2.4 Statement Extensions
150 # Number of Statement Extensions
152 <body>
153 # Number of original iterators
155 # List of original iterators
156 i j
157 # Statement body expression
158 b[j][i] = 0;
159 </body>
161 <extbody>
162 # Number of accesses
164 # Access coordinates (start/length)
165 0 7
166 # Number of original iterators
168 # List of original iterators
169 i j
170 # Statement body expression
171 b[j][i] = 0;
172 </extbody>
174 # =============================================== Extensions
175 <scatnames>
176 b0 i b1 j b2
177 </scatnames>
179 <arrays>
180 # Number of arrays
182 # Mapping array-identifiers/array-names
183 1 i
184 2 N
185 3 j
186 4 M
187 5 a
188 6 b
189 </arrays>
191 <coordinates>
192 # File name
193 ./unitary/datacopy.c
194 # Starting line and column
195 2 0
196 # Ending line and column
197 41 0
198 # Indentation
200 </coordinates>
202 <clay>
204 a = get_array_id ("a");
205 b = get_array_id("b");
207 c = add_array("a_copy");
208 d = add_array("b_copy");
210 replace_array(a, c);
211 replace_array(b, d);
213 y = [0,0,0]; # beta for the statement a
214 z = [0,0,1]; # beta for the statement b
216 # copy data
217 datacopy(c, a, [0], true, y); # a_copy = a
218 y = [1,0,0];
219 z = [1,0,1];
220 datacopy(d, b, [0], true, z); # b_copy = b
221 fuse([0]);
222 fuse([0,0]);
224 # backup data
225 datacopy(a, c, [1], false, y); # a = a_copy
226 datacopy(b, d, [1], false, z); # b = b_copy
227 fuse([2]);
228 fuse([2,0]);
230 dimreorder([], c, [1, 0]);
231 dimreorder([], d, [1, 0]);
233 </clay>
235 </OpenScop>