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

SCM Repository

[diderot] Annotation of /branches/vis12/src/compiler/mid-il/mid-il.sml
ViewVC logotype

Annotation of /branches/vis12/src/compiler/mid-il/mid-il.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1939 - (view) (download)

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

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