1 # CLooG example file #5.
2 # Please read the first and second examples which are fully documented to
3 # understand the different parts of the input file.
5 ################################################################################
6 # do i=1,n The problem here is to regenerate a #
7 # | do j =1,i-1 real-life Cholesau kernel according to #
8 # | | if (j.EQ.1) then the original scheduling (see the user's #
9 #S1| | | s1(i,j)=a(i,j)s4(j,i)**2 manual for more details). The original #
10 # | | else program is given on the left. For each #
11 #S2| | | s1(i,j)=s1(i,j-1)-s4(j,i)**2 statement the original schedule is: #
12 # | if (i .EQ. 1) then T_S1(i,j) =(i,0,j,0,0,0) #
13 #S3| | s2(i)=sqrt(a(i,i)) T_S2(i,j) =(i,0,j,1,0,0) #
14 # | else T_S3(i) =(i,1,0,0,0,0) #
15 #S4| | s2(i)=sqrt (s1(i,i-1)) T_S4(i) =(i,2,0,0,0,0) #
16 # | do k=i+1,n T_S5(i,j,k)=(i,3,j,0,k,0) #
17 # | | do l=1,i-1 T_S6(i,j,k)=(i,3,j,0,k,1) #
18 # | | | if (l .EQ. 1) then T_S7(i,j) =(i,3,j,1,0,0) #
19 #S5| | | | s3(i,k,l)=a(k,i)-(s4(l,k)*s4(l,i)) T_S8(i,j) =(i,3,j,2,0,0) #
21 #S6| | | | s3(i,k,l)=s3(i,k,l-1)-(s4(l,k)*s4(l,i)) #
22 # | | if (i .EQ.1) then #
23 #S7| | | s4(i,k)=a(k,i)/s2(i) Note that in the generated code there #
24 # | | else are no more conditions. #
25 #S8| | | s4(i,k)=s3(i,k,i-1)/s2(i) #
26 ################################################################################
28 #------------------------------------CONTEXT------------------------------------
30 # 1. language: FORTRAN
33 # 2. Parameters {n | n>=10}
38 # 3. We set manually the parameter name: n
42 #-----------------------------------POLYHEDRA-----------------------------------
44 # 4. Number of polyhedra:
49 # {i, j | 1<=i<=n; 1<=j<=i-1; j=1}
61 # {i, j | 1<=i<=n; 1<=j<=i-1; j!=1}
105 # {i, j | 1<=i<=n; i+1<=j<=n; 1<=k<=i-1; k=1}
110 1 -1 1 0 0 -1 # i+1<=j
113 1 1 0 -1 0 -1 # k<=i-1
119 # {i, j | 1<=i<=n; i+1<=j<=n; 1<=k<=i-1; k!=1}
124 1 -1 1 0 0 -1 # i+1<=j
127 1 1 0 -1 0 -1 # k<=i-1
133 1 -1 1 0 0 -1 # i+1<=j
136 1 1 0 -1 0 -1 # k<=i-1
142 # {i, j | 1<=i<=n; i+1<=j<=n; i=1}
154 # {i, j | 1<=i<=n; i+1<=j<=n; i!=1}
171 # 6. We let CLooG choose the iterator names
174 #----------------------------------SCATTERING-----------------------------------
176 # 7. Scattering functions ORIGINAL SCHEDULING
179 # Scattering function for polyhedron #1: T_S1(i,j) =(i,0,j,0,0,0)
181 # c1 c2 c3 c4 c5 c6 i j n 1
182 0 1 0 0 0 0 0 -1 0 0 0 # i
183 0 0 1 0 0 0 0 0 0 0 0 # 0
184 0 0 0 1 0 0 0 0 -1 0 0 # j
185 0 0 0 0 1 0 0 0 0 0 0 # 0
186 0 0 0 0 0 1 0 0 0 0 0 # 0
187 0 0 0 0 0 0 1 0 0 0 0 # 0
189 # Scattering function for polyhedron #2: T_S2(i,j) =(i,0,j,1,0,0)
191 # c1 c2 c3 c4 c5 c6 i j n 1
192 0 1 0 0 0 0 0 -1 0 0 0 # i
193 0 0 1 0 0 0 0 0 0 0 0 # 0
194 0 0 0 1 0 0 0 0 -1 0 0 # j
195 0 0 0 0 1 0 0 0 0 0 -1 # 1
196 0 0 0 0 0 1 0 0 0 0 0 # 0
197 0 0 0 0 0 0 1 0 0 0 0 # 0
199 # Scattering function for polyhedron #3: T_S3(i) =(i,1,0,0,0,0)
201 # c1 c2 c3 c4 c5 c6 i n 1
202 0 1 0 0 0 0 0 -1 0 0 # i
203 0 0 1 0 0 0 0 0 0 -1 # 1
204 0 0 0 1 0 0 0 0 0 0 # 0
205 0 0 0 0 1 0 0 0 0 0 # 0
206 0 0 0 0 0 1 0 0 0 0 # 0
207 0 0 0 0 0 0 1 0 0 0 # 0
209 # Scattering function for polyhedron #4: T_S4(i) =(i,2,0,0,0,0)
211 # c1 c2 c3 c4 c5 c6 i n 1
212 0 1 0 0 0 0 0 -1 0 0 # i
213 0 0 1 0 0 0 0 0 0 -2 # 2
214 0 0 0 1 0 0 0 0 0 0 # 0
215 0 0 0 0 1 0 0 0 0 0 # 0
216 0 0 0 0 0 1 0 0 0 0 # 0
217 0 0 0 0 0 0 1 0 0 0 # 0
219 # Scattering function for polyhedron #5: T_S5(i,j,k)=(i,3,j,0,k,0)
221 # c1 c2 c3 c4 c5 c6 i j k n 1
222 0 1 0 0 0 0 0 -1 0 0 0 0 # i
223 0 0 1 0 0 0 0 0 0 0 0 -3 # 3
224 0 0 0 1 0 0 0 0 -1 0 0 0 # j
225 0 0 0 0 1 0 0 0 0 0 0 0 # 0
226 0 0 0 0 0 1 0 0 0 -1 0 0 # k
227 0 0 0 0 0 0 1 0 0 0 0 0 # 0
229 # Scattering function for polyhedron #6: T_S6(i,j,k)=(i,3,j,0,k,1)
231 # c1 c2 c3 c4 c5 c6 i j k n 1
232 0 1 0 0 0 0 0 -1 0 0 0 0 # i
233 0 0 1 0 0 0 0 0 0 0 0 -3 # 3
234 0 0 0 1 0 0 0 0 -1 0 0 0 # j
235 0 0 0 0 1 0 0 0 0 0 0 0 # 0
236 0 0 0 0 0 1 0 0 0 -1 0 0 # k
237 0 0 0 0 0 0 1 0 0 0 0 -1 # 1
239 # Scattering function for polyhedron #7: T_S7(i,j) =(i,3,j,1,0,0)
241 # c1 c2 c3 c4 c5 c6 i j n 1
242 0 1 0 0 0 0 0 -1 0 0 0 # i
243 0 0 1 0 0 0 0 0 0 0 -3 # 3
244 0 0 0 1 0 0 0 0 -1 0 0 # j
245 0 0 0 0 1 0 0 0 0 0 -1 # 1
246 0 0 0 0 0 1 0 0 0 0 0 # 0
247 0 0 0 0 0 0 1 0 0 0 0 # 0
249 # Scattering function for polyhedron #8: T_S8(i,j) =(i,3,j,2,0,0)
251 # c1 c2 c3 c4 c5 c6 i j n 1
252 0 1 0 0 0 0 0 -1 0 0 0 # i
253 0 0 1 0 0 0 0 0 0 0 -3 # 3
254 0 0 0 1 0 0 0 0 -1 0 0 # j
255 0 0 0 0 1 0 0 0 0 0 -2 # 2
256 0 0 0 0 0 1 0 0 0 0 0 # 0
257 0 0 0 0 0 0 1 0 0 0 0 # 0
259 # We want to set manually the scattering dimension names.