Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /branches/charisee/src/compiler/low-il/low-il.sml
ViewVC logotype

Annotation of /branches/charisee/src/compiler/low-il/low-il.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2668 - (view) (download)

1 : jhr 458 (* low-il.in
2 :     *
3 :     * COPYRIGHT (c) 2010 The Diderot Project (http://diderot-language.cs.uchicago.edu)
4 :     * All rights reserved.
5 :     *
6 :     * Lower-level version of the Diderot IL input file.
7 :     *
8 :     *)
9 :    
10 :     structure LowOps =
11 :     struct
12 :    
13 : jhr 1640 (* required helper functions for types *)
14 : jhr 458 type ty = LowILTypes.ty
15 :     val samety = LowILTypes.same
16 :     val hashty = LowILTypes.hash
17 :     val tyToString = LowILTypes.toString
18 :    
19 : jhr 1640 (* required helper functions for type lists *)
20 :     type tys = ty list
21 :     fun sametys (tys1, tys2) = ListPair.allEq samety (tys1, tys2)
22 :     fun hashtys tys = List.foldl (fn (ty, s) => hashty ty + 0w3 * s) 0w0 tys
23 :     fun tysToString tys = String.concat["[", String.concatWith "," (List.map tyToString tys), "]" ]
24 :    
25 :     (* required helper functions for the int type *)
26 : jhr 458 fun sameint (i1 : int, i2) = (i1 = i2)
27 :     fun hashint i = Word.fromInt i
28 :     fun intToString i = Int.toString i
29 : cchiw 2620
30 : jhr 1640 (* required helper functions for the string type *)
31 : jhr 458 fun samestring (s1 : string, s2) = (s1 = s2)
32 :     val hashstring = HashString.hashString
33 :     fun stringToString s = String.concat["\"", s, "\""]
34 :    
35 :     datatype rator
36 : cchiw 2523 = IAdd
37 :     | ISub
38 :     | IMul
39 :     | IDiv
40 :     | INeg
41 : cchiw 2631 | IndexTensor of int * ty * ty * ty
42 : cchiw 2523 | addSca
43 :     | subSca
44 :     | prodSca
45 :     | divSca
46 : cchiw 2525 | addVec of int
47 :     | subVec of int
48 :     | prodVec of int
49 :     | prodScaV of int
50 :     | sumVec of int
51 : cchiw 2628 | Abs of ty
52 :     | LT of ty
53 :     | LTE of ty
54 :     | EQ of ty
55 :     | NEQ of ty
56 :     | GT of ty
57 :     | GTE of ty
58 :     | Not
59 :     | Max
60 :     | Min
61 : jhr 1295 | Clamp of ty
62 : jhr 1116 | Lerp of ty
63 : jhr 458 | PrincipleEvec of ty
64 : jhr 1640 | EigenVecs2x2
65 :     | EigenVecs3x3
66 :     | EigenVals2x2
67 :     | EigenVals3x3
68 : jhr 1116 | Zero of ty
69 : jhr 1640 | Select of ty * int
70 :     | Index of ty * int
71 : jhr 458 | Subscript of ty
72 : cchiw 2400 | MkDynamic of ty * int
73 :     | Append of ty
74 :     | Prepend of ty
75 :     | Concat of ty
76 : cchiw 2667 | Sqrt
77 : jhr 1116 | Ceiling of int
78 : jhr 458 | Floor of int
79 : jhr 1116 | Round of int
80 :     | Trunc of int
81 : jhr 458 | IntToReal
82 : jhr 1116 | RealToInt of int
83 : cchiw 2523 | Transform of ImageInfo.info
84 :     | Translate of ImageInfo.info
85 : cchiw 2525 | Kernel of Kernel.kernel * int
86 : jhr 511 | ImageAddress of ImageInfo.info
87 : jhr 1116 | LoadVoxels of ImageInfo.info * int
88 :     | Inside of ImageInfo.info * int
89 : cchiw 2400 | LoadSeq of ty * string
90 : cchiw 2525 | LoadImage of ImageInfo.info
91 : cchiw 2628 | imgAddr of ImageInfo.info * ty * int
92 :     | imgLoad of ImageInfo.info * int * int
93 : cchiw 2525 | Input of ty * string * string
94 :     | InputWithDefault of ty * string * string
95 : jhr 1640 | Print of tys
96 : jhr 458
97 : cchiw 2523 fun resultArity IAdd = 1
98 :     | resultArity ISub = 1
99 :     | resultArity IMul = 1
100 :     | resultArity IDiv = 1
101 :     | resultArity INeg = 1
102 : cchiw 2631 | resultArity (IndexTensor _) = 1
103 : cchiw 2523 | resultArity addSca = 1
104 :     | resultArity subSca = 1
105 :     | resultArity prodSca = 1
106 :     | resultArity divSca = 1
107 : cchiw 2525 | resultArity (addVec _) = 1
108 :     | resultArity (subVec _) = 1
109 :     | resultArity (prodVec _) = 1
110 :     | resultArity (prodScaV _) = 1
111 :     | resultArity (sumVec _) = 1
112 : cchiw 2628 | resultArity (Abs _) = 1
113 :     | resultArity (LT _) = 1
114 :     | resultArity (LTE _) = 1
115 :     | resultArity (EQ _) = 1
116 :     | resultArity (NEQ _) = 1
117 :     | resultArity (GT _) = 1
118 :     | resultArity (GTE _) = 1
119 :     | resultArity Not = 1
120 :     | resultArity Max = 1
121 :     | resultArity Min = 1
122 : jhr 1640 | resultArity (Clamp _) = 1
123 :     | resultArity (Lerp _) = 1
124 :     | resultArity (PrincipleEvec _) = 1
125 :     | resultArity EigenVecs2x2 = 1
126 :     | resultArity EigenVecs3x3 = 1
127 :     | resultArity EigenVals2x2 = 1
128 :     | resultArity EigenVals3x3 = 1
129 :     | resultArity (Zero _) = 1
130 :     | resultArity (Select _) = 1
131 :     | resultArity (Index _) = 1
132 :     | resultArity (Subscript _) = 1
133 : cchiw 2400 | resultArity (MkDynamic _) = 1
134 :     | resultArity (Append _) = 2
135 :     | resultArity (Prepend _) = 2
136 :     | resultArity (Concat _) = 2
137 : cchiw 2667 | resultArity Sqrt = 1
138 : jhr 1640 | resultArity (Ceiling _) = 1
139 :     | resultArity (Floor _) = 1
140 :     | resultArity (Round _) = 1
141 :     | resultArity (Trunc _) = 1
142 :     | resultArity IntToReal = 1
143 :     | resultArity (RealToInt _) = 1
144 : cchiw 2523 | resultArity (Transform _) = 1
145 :     | resultArity (Translate _) = 1
146 : cchiw 2525 | resultArity (Kernel _) = 1
147 : jhr 1640 | resultArity (ImageAddress _) = 1
148 :     | resultArity (LoadVoxels _) = 1
149 : cchiw 2400 | resultArity (Inside _) = 1
150 :     | resultArity (LoadSeq _) = 1
151 : jhr 1640 | resultArity (LoadImage _) = 1
152 : cchiw 2628 | resultArity (imgAddr _) = 1
153 :     | resultArity (imgLoad _) = 1
154 : cchiw 2525 | resultArity (Input _) = 1
155 :     | resultArity (InputWithDefault _) = 1
156 : jhr 1640 | resultArity (Print _) = 0
157 :    
158 : cchiw 2523 fun arity IAdd = 2
159 :     | arity ISub = 2
160 :     | arity IMul = 2
161 :     | arity IDiv = 2
162 :     | arity INeg = 1
163 : cchiw 2631 | arity (IndexTensor _) = 2
164 : cchiw 2523 | arity addSca = 2
165 :     | arity subSca = 2
166 :     | arity prodSca = 2
167 :     | arity divSca = 2
168 : cchiw 2525 | arity (addVec _) = 2
169 :     | arity (subVec _) = 2
170 :     | arity (prodVec _) = 2
171 :     | arity (prodScaV _) = 2
172 :     | arity (sumVec _) = 2
173 : cchiw 2628 | arity (Abs _) = 1
174 :     | arity (LT _) = 2
175 :     | arity (LTE _) = 2
176 :     | arity (EQ _) = 2
177 :     | arity (NEQ _) = 2
178 :     | arity (GT _) = 2
179 :     | arity (GTE _) = 2
180 :     | arity Not = 1
181 :     | arity Max = 2
182 :     | arity Min = 2
183 : jhr 1295 | arity (Clamp _) = 3
184 : jhr 1116 | arity (Lerp _) = 3
185 : jhr 458 | arity (PrincipleEvec _) = 2
186 : jhr 1640 | arity EigenVecs2x2 = 1
187 :     | arity EigenVecs3x3 = 1
188 :     | arity EigenVals2x2 = 1
189 :     | arity EigenVals3x3 = 1
190 : jhr 1116 | arity (Zero _) = 0
191 : jhr 1640 | arity (Select _) = 1
192 :     | arity (Index _) = 1
193 : jhr 458 | arity (Subscript _) = 2
194 : cchiw 2400 | arity (MkDynamic _) = 1
195 :     | arity (Append _) = 1
196 :     | arity (Prepend _) = 1
197 :     | arity (Concat _) = 1
198 : cchiw 2667 | arity Sqrt = 1
199 : jhr 1116 | arity (Ceiling _) = 1
200 : jhr 458 | arity (Floor _) = 1
201 : jhr 1116 | arity (Round _) = 1
202 :     | arity (Trunc _) = 1
203 : jhr 458 | arity IntToReal = 1
204 : jhr 1116 | arity (RealToInt _) = 1
205 : cchiw 2523 | arity (Transform _) = 2
206 :     | arity (Translate _) = 2
207 : cchiw 2525 | arity (Kernel _) = 0
208 : jhr 1116 | arity (ImageAddress _) = 1
209 : jhr 458 | arity (LoadVoxels _) = 1
210 : jhr 1116 | arity (Inside _) = 2
211 : cchiw 2400 | arity (LoadSeq _) = 0
212 :     | arity (LoadImage _) = 0
213 : cchiw 2628 | arity (imgAddr _) = 2
214 :     | arity (imgLoad _) = 2
215 : cchiw 2525 | arity (Input _) = 0
216 :     | arity (InputWithDefault _) = 1
217 : jhr 1640 | arity (Print _) = ~1
218 : jhr 458
219 : cchiw 2400 fun isPure (MkDynamic _) = false
220 :     | isPure (Append _) = false
221 :     | isPure (Prepend _) = false
222 :     | isPure (Concat _) = false
223 :     | isPure (Print _) = false
224 : jhr 2356 | isPure _ = true
225 :    
226 : cchiw 2522 fun same (IAdd, IAdd) = true
227 :     | same (ISub, ISub) = true
228 :     | same (IMul, IMul) = true
229 :     | same (IDiv, IDiv) = true
230 :     | same (INeg, INeg) = true
231 : cchiw 2631 | same (IndexTensor(a0,a1,a2,a3), IndexTensor(b0,b1,b2,b3)) = sameint(a0, b0) andalso samety(a1, b1) andalso samety(a2, b2) andalso samety(a3, b3)
232 : cchiw 2523 | same (addSca, addSca) = true
233 :     | same (subSca, subSca) = true
234 :     | same (prodSca, prodSca) = true
235 :     | same (divSca, divSca) = true
236 : cchiw 2525 | same (addVec(a0), addVec(b0)) = sameint(a0, b0)
237 :     | same (subVec(a0), subVec(b0)) = sameint(a0, b0)
238 :     | same (prodVec(a0), prodVec(b0)) = sameint(a0, b0)
239 :     | same (prodScaV(a0), prodScaV(b0)) = sameint(a0, b0)
240 :     | same (sumVec(a0), sumVec(b0)) = sameint(a0, b0)
241 : cchiw 2628 | same (Abs(a0), Abs(b0)) = samety(a0, b0)
242 :     | same (LT(a0), LT(b0)) = samety(a0, b0)
243 :     | same (LTE(a0), LTE(b0)) = samety(a0, b0)
244 :     | same (EQ(a0), EQ(b0)) = samety(a0, b0)
245 :     | same (NEQ(a0), NEQ(b0)) = samety(a0, b0)
246 :     | same (GT(a0), GT(b0)) = samety(a0, b0)
247 :     | same (GTE(a0), GTE(b0)) = samety(a0, b0)
248 :     | same (Not, Not) = true
249 :     | same (Max, Max) = true
250 :     | same (Min, Min) = true
251 : jhr 1295 | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)
252 : jhr 1116 | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)
253 : jhr 458 | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)
254 : jhr 1640 | same (EigenVecs2x2, EigenVecs2x2) = true
255 :     | same (EigenVecs3x3, EigenVecs3x3) = true
256 :     | same (EigenVals2x2, EigenVals2x2) = true
257 :     | same (EigenVals3x3, EigenVals3x3) = true
258 : jhr 1116 | same (Zero(a0), Zero(b0)) = samety(a0, b0)
259 : jhr 1640 | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
260 :     | same (Index(a0,a1), Index(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
261 : jhr 458 | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)
262 : cchiw 2400 | same (MkDynamic(a0,a1), MkDynamic(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
263 :     | same (Append(a0), Append(b0)) = samety(a0, b0)
264 :     | same (Prepend(a0), Prepend(b0)) = samety(a0, b0)
265 :     | same (Concat(a0), Concat(b0)) = samety(a0, b0)
266 : cchiw 2667 | same (Sqrt, Sqrt) = true
267 : jhr 1116 | same (Ceiling(a0), Ceiling(b0)) = sameint(a0, b0)
268 : jhr 458 | same (Floor(a0), Floor(b0)) = sameint(a0, b0)
269 : jhr 1116 | same (Round(a0), Round(b0)) = sameint(a0, b0)
270 :     | same (Trunc(a0), Trunc(b0)) = sameint(a0, b0)
271 : jhr 458 | same (IntToReal, IntToReal) = true
272 : jhr 1116 | same (RealToInt(a0), RealToInt(b0)) = sameint(a0, b0)
273 : cchiw 2523 | same (Transform(a0), Transform(b0)) = ImageInfo.same(a0, b0)
274 :     | same (Translate(a0), Translate(b0)) = ImageInfo.same(a0, b0)
275 : cchiw 2525 | same (Kernel(a0,a1), Kernel(b0,b1)) = Kernel.same(a0, b0) andalso sameint(a1, b1)
276 : jhr 511 | same (ImageAddress(a0), ImageAddress(b0)) = ImageInfo.same(a0, b0)
277 : jhr 1116 | same (LoadVoxels(a0,a1), LoadVoxels(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
278 :     | same (Inside(a0,a1), Inside(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
279 : cchiw 2400 | same (LoadSeq(a0,a1), LoadSeq(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)
280 : cchiw 2525 | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)
281 : cchiw 2628 | same (imgAddr(a0,a1,a2), imgAddr(b0,b1,b2)) = ImageInfo.same(a0, b0) andalso samety(a1, b1) andalso sameint(a2, b2)
282 :     | same (imgLoad(a0,a1,a2), imgLoad(b0,b1,b2)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)
283 : cchiw 2525 | same (Input(a0,a1,a2), Input(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
284 :     | same (InputWithDefault(a0,a1,a2), InputWithDefault(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
285 : jhr 1640 | same (Print(a0), Print(b0)) = sametys(a0, b0)
286 : jhr 458 | same _ = false
287 :    
288 : cchiw 2523 fun hash IAdd = 0w3
289 :     | hash ISub = 0w5
290 :     | hash IMul = 0w7
291 :     | hash IDiv = 0w11
292 :     | hash INeg = 0w13
293 : cchiw 2637 | hash (IndexTensor(a0,a1,a2,a3)) = 0w17 + hashint a0 + hashty a1 + hashty a2 + hashty a3
294 :     | hash addSca = 0w19
295 :     | hash subSca = 0w23
296 :     | hash prodSca = 0w29
297 :     | hash divSca = 0w31
298 :     | hash (addVec(a0)) = 0w37 + hashint a0
299 :     | hash (subVec(a0)) = 0w41 + hashint a0
300 :     | hash (prodVec(a0)) = 0w43 + hashint a0
301 :     | hash (prodScaV(a0)) = 0w47 + hashint a0
302 :     | hash (sumVec(a0)) = 0w53 + hashint a0
303 :     | hash (Abs(a0)) = 0w59 + hashty a0
304 :     | hash (LT(a0)) = 0w61 + hashty a0
305 :     | hash (LTE(a0)) = 0w67 + hashty a0
306 :     | hash (EQ(a0)) = 0w71 + hashty a0
307 :     | hash (NEQ(a0)) = 0w73 + hashty a0
308 :     | hash (GT(a0)) = 0w79 + hashty a0
309 :     | hash (GTE(a0)) = 0w83 + hashty a0
310 :     | hash Not = 0w89
311 :     | hash Max = 0w97
312 :     | hash Min = 0w101
313 :     | hash (Clamp(a0)) = 0w103 + hashty a0
314 :     | hash (Lerp(a0)) = 0w107 + hashty a0
315 : cchiw 2668 | hash (PrincipleEvec(a0)) = 0w109 + hashty a0
316 :     | hash EigenVecs2x2 = 0w113
317 :     | hash EigenVecs3x3 = 0w127
318 :     | hash EigenVals2x2 = 0w131
319 :     | hash EigenVals3x3 = 0w137
320 :     | hash (Zero(a0)) = 0w139 + hashty a0
321 :     | hash (Select(a0,a1)) = 0w149 + hashty a0 + hashint a1
322 :     | hash (Index(a0,a1)) = 0w151 + hashty a0 + hashint a1
323 :     | hash (Subscript(a0)) = 0w157 + hashty a0
324 :     | hash (MkDynamic(a0,a1)) = 0w163 + hashty a0 + hashint a1
325 :     | hash (Append(a0)) = 0w167 + hashty a0
326 :     | hash (Prepend(a0)) = 0w173 + hashty a0
327 :     | hash (Concat(a0)) = 0w179 + hashty a0
328 :     | hash Sqrt = 0w181
329 :     | hash (Ceiling(a0)) = 0w191 + hashint a0
330 :     | hash (Floor(a0)) = 0w193 + hashint a0
331 :     | hash (Round(a0)) = 0w197 + hashint a0
332 :     | hash (Trunc(a0)) = 0w199 + hashint a0
333 :     | hash IntToReal = 0w211
334 :     | hash (RealToInt(a0)) = 0w223 + hashint a0
335 :     | hash (Transform(a0)) = 0w227 + ImageInfo.hash a0
336 :     | hash (Translate(a0)) = 0w229 + ImageInfo.hash a0
337 :     | hash (Kernel(a0,a1)) = 0w233 + Kernel.hash a0 + hashint a1
338 :     | hash (ImageAddress(a0)) = 0w239 + ImageInfo.hash a0
339 :     | hash (LoadVoxels(a0,a1)) = 0w241 + ImageInfo.hash a0 + hashint a1
340 :     | hash (Inside(a0,a1)) = 0w251 + ImageInfo.hash a0 + hashint a1
341 :     | hash (LoadSeq(a0,a1)) = 0w257 + hashty a0 + hashstring a1
342 :     | hash (LoadImage(a0)) = 0w263 + ImageInfo.hash a0
343 :     | hash (imgAddr(a0,a1,a2)) = 0w269 + ImageInfo.hash a0 + hashty a1 + hashint a2
344 :     | hash (imgLoad(a0,a1,a2)) = 0w271 + ImageInfo.hash a0 + hashint a1 + hashint a2
345 :     | hash (Input(a0,a1,a2)) = 0w277 + hashty a0 + hashstring a1 + hashstring a2
346 :     | hash (InputWithDefault(a0,a1,a2)) = 0w281 + hashty a0 + hashstring a1 + hashstring a2
347 :     | hash (Print(a0)) = 0w283 + hashtys a0
348 : jhr 458
349 : cchiw 2523 fun toString IAdd = "IAdd"
350 :     | toString ISub = "ISub"
351 :     | toString IMul = "IMul"
352 :     | toString IDiv = "IDiv"
353 :     | toString INeg = "INeg"
354 : cchiw 2631 | toString (IndexTensor(a0,a1,a2,a3)) = concat["IndexTensor<", intToString a0, ",", tyToString a1, ",", tyToString a2, ",", tyToString a3, ">"]
355 : cchiw 2523 | toString addSca = "addSca"
356 :     | toString subSca = "subSca"
357 :     | toString prodSca = "prodSca"
358 :     | toString divSca = "divSca"
359 : cchiw 2525 | toString (addVec(a0)) = concat["addVec<", intToString a0, ">"]
360 :     | toString (subVec(a0)) = concat["subVec<", intToString a0, ">"]
361 :     | toString (prodVec(a0)) = concat["prodVec<", intToString a0, ">"]
362 :     | toString (prodScaV(a0)) = concat["prodScaV<", intToString a0, ">"]
363 :     | toString (sumVec(a0)) = concat["sumVec<", intToString a0, ">"]
364 : cchiw 2628 | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"]
365 :     | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]
366 :     | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]
367 :     | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]
368 :     | toString (NEQ(a0)) = concat["NEQ<", tyToString a0, ">"]
369 :     | toString (GT(a0)) = concat["GT<", tyToString a0, ">"]
370 :     | toString (GTE(a0)) = concat["GTE<", tyToString a0, ">"]
371 :     | toString Not = "Not"
372 :     | toString Max = "Max"
373 :     | toString Min = "Min"
374 : jhr 1295 | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]
375 : jhr 1116 | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]
376 : jhr 458 | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]
377 : jhr 1640 | toString EigenVecs2x2 = "EigenVecs2x2"
378 :     | toString EigenVecs3x3 = "EigenVecs3x3"
379 :     | toString EigenVals2x2 = "EigenVals2x2"
380 :     | toString EigenVals3x3 = "EigenVals3x3"
381 : jhr 1116 | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"]
382 : jhr 1640 | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]
383 :     | toString (Index(a0,a1)) = concat["Index<", tyToString a0, ",", intToString a1, ">"]
384 : jhr 458 | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]
385 : cchiw 2400 | toString (MkDynamic(a0,a1)) = concat["MkDynamic<", tyToString a0, ",", intToString a1, ">"]
386 :     | toString (Append(a0)) = concat["Append<", tyToString a0, ">"]
387 :     | toString (Prepend(a0)) = concat["Prepend<", tyToString a0, ">"]
388 :     | toString (Concat(a0)) = concat["Concat<", tyToString a0, ">"]
389 : cchiw 2667 | toString Sqrt = "Sqrt"
390 : jhr 1116 | toString (Ceiling(a0)) = concat["Ceiling<", intToString a0, ">"]
391 : jhr 458 | toString (Floor(a0)) = concat["Floor<", intToString a0, ">"]
392 : jhr 1116 | toString (Round(a0)) = concat["Round<", intToString a0, ">"]
393 :     | toString (Trunc(a0)) = concat["Trunc<", intToString a0, ">"]
394 : jhr 458 | toString IntToReal = "IntToReal"
395 : jhr 1116 | toString (RealToInt(a0)) = concat["RealToInt<", intToString a0, ">"]
396 : cchiw 2523 | toString (Transform(a0)) = concat["Transform<", ImageInfo.toString a0, ">"]
397 :     | toString (Translate(a0)) = concat["Translate<", ImageInfo.toString a0, ">"]
398 : cchiw 2525 | toString (Kernel(a0,a1)) = concat["Kernel<", Kernel.toString a0, ",", intToString a1, ">"]
399 : jhr 511 | toString (ImageAddress(a0)) = concat["ImageAddress<", ImageInfo.toString a0, ">"]
400 : jhr 1116 | toString (LoadVoxels(a0,a1)) = concat["LoadVoxels<", ImageInfo.toString a0, ",", intToString a1, ">"]
401 :     | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]
402 : cchiw 2400 | toString (LoadSeq(a0,a1)) = concat["LoadSeq<", tyToString a0, ",", stringToString a1, ">"]
403 : cchiw 2525 | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]
404 : cchiw 2628 | toString (imgAddr(a0,a1,a2)) = concat["imgAddr<", ImageInfo.toString a0, ",", tyToString a1, ",", intToString a2, ">"]
405 :     | toString (imgLoad(a0,a1,a2)) = concat["imgLoad<", ImageInfo.toString a0, ",", intToString a1, ",", intToString a2, ">"]
406 : cchiw 2525 | toString (Input(a0,a1,a2)) = concat["Input<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
407 :     | toString (InputWithDefault(a0,a1,a2)) = concat["InputWithDefault<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
408 : cchiw 2523 | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]
409 : jhr 458
410 :     end
411 :    
412 :     structure LowIL = SSAFn(
413 : jhr 1232 val ilName = "low-il"
414 : jhr 458 structure Ty = LowILTypes
415 :     structure Op = LowOps)
416 : jhr 1116
417 :     structure LowILCensus = CensusFn(LowIL)
418 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0