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 1689 - (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 287 | Cross
59 : jhr 1116 | Norm of ty
60 :     | Normalize of int
61 :     | Scale of ty
62 : jhr 287 | PrincipleEvec of ty
63 : jhr 1640 | EigenVecs2x2
64 :     | EigenVecs3x3
65 :     | EigenVals2x2
66 :     | EigenVals3x3
67 : jhr 1116 | Identity of int
68 :     | Zero of ty
69 :     | Trace of int
70 : jhr 1640 | Select of ty * int
71 :     | Index of ty * int
72 : jhr 287 | Subscript of ty
73 : jhr 1689 | MkDynamic of ty * int
74 :     | Append of ty
75 :     | Prepend of ty
76 :     | Concat of ty
77 : jhr 1116 | Ceiling of int
78 : jhr 333 | Floor of int
79 : jhr 1116 | Round of int
80 :     | Trunc of int
81 : jhr 287 | IntToReal
82 : jhr 1116 | RealToInt of int
83 :     | VoxelAddress of ImageInfo.info * int
84 :     | LoadVoxels of ImageInfo.info * int
85 : jhr 450 | PosToImgSpace of ImageInfo.info
86 : jhr 1116 | TensorToWorldSpace of ImageInfo.info * ty
87 : jhr 328 | EvalKernel of int * Kernel.kernel * int
88 : jhr 287 | LoadImage of ImageInfo.info
89 : jhr 1116 | Inside of ImageInfo.info * int
90 : jhr 1301 | Input of ty * string * string
91 :     | InputWithDefault of ty * string * string
92 : jhr 1640 | Print of tys
93 : jhr 287
94 : jhr 1640 fun resultArity (Add _) = 1
95 :     | resultArity (Sub _) = 1
96 :     | resultArity (Mul _) = 1
97 :     | resultArity (Div _) = 1
98 :     | resultArity (Neg _) = 1
99 :     | resultArity (Abs _) = 1
100 :     | resultArity (LT _) = 1
101 :     | resultArity (LTE _) = 1
102 :     | resultArity (EQ _) = 1
103 :     | resultArity (NEQ _) = 1
104 :     | resultArity (GT _) = 1
105 :     | resultArity (GTE _) = 1
106 :     | resultArity Not = 1
107 :     | resultArity Max = 1
108 :     | resultArity Min = 1
109 :     | resultArity (Clamp _) = 1
110 :     | resultArity (Lerp _) = 1
111 :     | resultArity (Dot _) = 1
112 :     | resultArity (MulVecMat _) = 1
113 :     | resultArity (MulMatVec _) = 1
114 :     | resultArity (MulMatMat _) = 1
115 :     | resultArity Cross = 1
116 :     | resultArity (Norm _) = 1
117 :     | resultArity (Normalize _) = 1
118 :     | resultArity (Scale _) = 1
119 :     | resultArity (PrincipleEvec _) = 1
120 :     | resultArity EigenVecs2x2 = 1
121 :     | resultArity EigenVecs3x3 = 1
122 :     | resultArity EigenVals2x2 = 1
123 :     | resultArity EigenVals3x3 = 1
124 :     | resultArity (Identity _) = 1
125 :     | resultArity (Zero _) = 1
126 :     | resultArity (Trace _) = 1
127 :     | resultArity (Select _) = 1
128 :     | resultArity (Index _) = 1
129 :     | resultArity (Subscript _) = 1
130 : jhr 1689 | resultArity (MkDynamic _) = 1
131 :     | resultArity (Append _) = 2
132 :     | resultArity (Prepend _) = 2
133 :     | resultArity (Concat _) = 2
134 : jhr 1640 | resultArity (Ceiling _) = 1
135 :     | resultArity (Floor _) = 1
136 :     | resultArity (Round _) = 1
137 :     | resultArity (Trunc _) = 1
138 :     | resultArity IntToReal = 1
139 :     | resultArity (RealToInt _) = 1
140 :     | resultArity (VoxelAddress _) = 1
141 :     | resultArity (LoadVoxels _) = 1
142 :     | resultArity (PosToImgSpace _) = 1
143 :     | resultArity (TensorToWorldSpace _) = 1
144 :     | resultArity (EvalKernel _) = 1
145 :     | resultArity (LoadImage _) = 1
146 :     | resultArity (Inside _) = 1
147 :     | resultArity (Input _) = 1
148 :     | resultArity (InputWithDefault _) = 1
149 :     | resultArity (Print _) = 0
150 :    
151 : jhr 287 fun arity (Add _) = 2
152 :     | arity (Sub _) = 2
153 :     | arity (Mul _) = 2
154 :     | arity (Div _) = 2
155 :     | arity (Neg _) = 1
156 : jhr 1116 | arity (Abs _) = 1
157 : jhr 287 | arity (LT _) = 2
158 :     | arity (LTE _) = 2
159 :     | arity (EQ _) = 2
160 :     | arity (NEQ _) = 2
161 :     | arity (GT _) = 2
162 :     | arity (GTE _) = 2
163 : jhr 333 | arity Not = 1
164 :     | arity Max = 2
165 :     | arity Min = 2
166 : jhr 1295 | arity (Clamp _) = 3
167 : jhr 1116 | arity (Lerp _) = 3
168 : jhr 287 | arity (Dot _) = 2
169 : jhr 1116 | arity (MulVecMat _) = 2
170 :     | arity (MulMatVec _) = 2
171 :     | arity (MulMatMat _) = 2
172 : jhr 287 | arity Cross = 2
173 :     | arity (Norm _) = 1
174 : jhr 1116 | arity (Normalize _) = 1
175 : jhr 287 | arity (Scale _) = 2
176 :     | arity (PrincipleEvec _) = 2
177 : jhr 1640 | arity EigenVecs2x2 = 1
178 :     | arity EigenVecs3x3 = 1
179 :     | arity EigenVals2x2 = 1
180 :     | arity EigenVals3x3 = 1
181 : jhr 1116 | arity (Identity _) = 0
182 :     | arity (Zero _) = 0
183 :     | arity (Trace _) = 1
184 : jhr 1640 | arity (Select _) = 1
185 :     | arity (Index _) = 1
186 : jhr 287 | arity (Subscript _) = 2
187 : jhr 1689 | arity (MkDynamic _) = 1
188 :     | arity (Append _) = 1
189 :     | arity (Prepend _) = 1
190 :     | arity (Concat _) = 1
191 : jhr 1116 | arity (Ceiling _) = 1
192 : jhr 333 | arity (Floor _) = 1
193 : jhr 1116 | arity (Round _) = 1
194 :     | arity (Trunc _) = 1
195 : jhr 287 | arity IntToReal = 1
196 : jhr 1116 | arity (RealToInt _) = 1
197 : jhr 287 | arity (VoxelAddress _) = ~1
198 :     | arity (LoadVoxels _) = 1
199 : jhr 1116 | arity (PosToImgSpace _) = 2
200 :     | arity (TensorToWorldSpace _) = 2
201 : jhr 328 | arity (EvalKernel _) = 1
202 : jhr 1116 | arity (LoadImage _) = 1
203 :     | arity (Inside _) = 2
204 : jhr 287 | arity (Input _) = 0
205 :     | arity (InputWithDefault _) = 1
206 : jhr 1640 | arity (Print _) = ~1
207 : jhr 287
208 :     fun same (Add(a0), Add(b0)) = samety(a0, b0)
209 :     | same (Sub(a0), Sub(b0)) = samety(a0, b0)
210 :     | same (Mul(a0), Mul(b0)) = samety(a0, b0)
211 :     | same (Div(a0), Div(b0)) = samety(a0, b0)
212 :     | same (Neg(a0), Neg(b0)) = samety(a0, b0)
213 : jhr 1116 | same (Abs(a0), Abs(b0)) = samety(a0, b0)
214 : jhr 287 | same (LT(a0), LT(b0)) = samety(a0, b0)
215 :     | same (LTE(a0), LTE(b0)) = samety(a0, b0)
216 :     | same (EQ(a0), EQ(b0)) = samety(a0, b0)
217 :     | same (NEQ(a0), NEQ(b0)) = samety(a0, b0)
218 :     | same (GT(a0), GT(b0)) = samety(a0, b0)
219 :     | same (GTE(a0), GTE(b0)) = samety(a0, b0)
220 : jhr 333 | same (Not, Not) = true
221 :     | same (Max, Max) = true
222 :     | same (Min, Min) = true
223 : jhr 1295 | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)
224 : jhr 1116 | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)
225 : jhr 349 | same (Dot(a0), Dot(b0)) = sameint(a0, b0)
226 : jhr 1116 | same (MulVecMat(a0,a1), MulVecMat(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)
227 :     | same (MulMatVec(a0,a1), MulMatVec(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)
228 :     | same (MulMatMat(a0,a1,a2), MulMatMat(b0,b1,b2)) = sameint(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)
229 : jhr 287 | same (Cross, Cross) = true
230 : jhr 1116 | same (Norm(a0), Norm(b0)) = samety(a0, b0)
231 :     | same (Normalize(a0), Normalize(b0)) = sameint(a0, b0)
232 :     | same (Scale(a0), Scale(b0)) = samety(a0, b0)
233 : jhr 287 | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)
234 : jhr 1640 | same (EigenVecs2x2, EigenVecs2x2) = true
235 :     | same (EigenVecs3x3, EigenVecs3x3) = true
236 :     | same (EigenVals2x2, EigenVals2x2) = true
237 :     | same (EigenVals3x3, EigenVals3x3) = true
238 : jhr 1116 | same (Identity(a0), Identity(b0)) = sameint(a0, b0)
239 :     | same (Zero(a0), Zero(b0)) = samety(a0, b0)
240 :     | same (Trace(a0), Trace(b0)) = sameint(a0, b0)
241 : jhr 1640 | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
242 :     | same (Index(a0,a1), Index(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
243 : jhr 287 | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)
244 : jhr 1689 | same (MkDynamic(a0,a1), MkDynamic(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
245 :     | same (Append(a0), Append(b0)) = samety(a0, b0)
246 :     | same (Prepend(a0), Prepend(b0)) = samety(a0, b0)
247 :     | same (Concat(a0), Concat(b0)) = samety(a0, b0)
248 : jhr 1116 | same (Ceiling(a0), Ceiling(b0)) = sameint(a0, b0)
249 : jhr 333 | same (Floor(a0), Floor(b0)) = sameint(a0, b0)
250 : jhr 1116 | same (Round(a0), Round(b0)) = sameint(a0, b0)
251 :     | same (Trunc(a0), Trunc(b0)) = sameint(a0, b0)
252 : jhr 287 | same (IntToReal, IntToReal) = true
253 : jhr 1116 | same (RealToInt(a0), RealToInt(b0)) = sameint(a0, b0)
254 :     | same (VoxelAddress(a0,a1), VoxelAddress(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
255 :     | same (LoadVoxels(a0,a1), LoadVoxels(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
256 : jhr 450 | same (PosToImgSpace(a0), PosToImgSpace(b0)) = ImageInfo.same(a0, b0)
257 : jhr 1116 | same (TensorToWorldSpace(a0,a1), TensorToWorldSpace(b0,b1)) = ImageInfo.same(a0, b0) andalso samety(a1, b1)
258 : jhr 328 | same (EvalKernel(a0,a1,a2), EvalKernel(b0,b1,b2)) = sameint(a0, b0) andalso Kernel.same(a1, b1) andalso sameint(a2, b2)
259 : jhr 287 | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)
260 : jhr 1116 | same (Inside(a0,a1), Inside(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
261 : jhr 1301 | same (Input(a0,a1,a2), Input(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
262 :     | same (InputWithDefault(a0,a1,a2), InputWithDefault(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
263 : jhr 1640 | same (Print(a0), Print(b0)) = sametys(a0, b0)
264 : jhr 287 | same _ = false
265 :    
266 :     fun hash (Add(a0)) = 0w3 + hashty a0
267 :     | hash (Sub(a0)) = 0w5 + hashty a0
268 :     | hash (Mul(a0)) = 0w7 + hashty a0
269 :     | hash (Div(a0)) = 0w11 + hashty a0
270 :     | hash (Neg(a0)) = 0w13 + hashty a0
271 : jhr 1116 | hash (Abs(a0)) = 0w17 + hashty a0
272 :     | hash (LT(a0)) = 0w19 + hashty a0
273 :     | hash (LTE(a0)) = 0w23 + hashty a0
274 :     | hash (EQ(a0)) = 0w29 + hashty a0
275 :     | hash (NEQ(a0)) = 0w31 + hashty a0
276 :     | hash (GT(a0)) = 0w37 + hashty a0
277 :     | hash (GTE(a0)) = 0w41 + hashty a0
278 :     | hash Not = 0w43
279 :     | hash Max = 0w47
280 :     | hash Min = 0w53
281 : jhr 1295 | hash (Clamp(a0)) = 0w59 + hashty a0
282 :     | hash (Lerp(a0)) = 0w61 + hashty a0
283 :     | hash (Dot(a0)) = 0w67 + hashint a0
284 :     | hash (MulVecMat(a0,a1)) = 0w71 + hashint a0 + hashint a1
285 :     | hash (MulMatVec(a0,a1)) = 0w73 + hashint a0 + hashint a1
286 :     | hash (MulMatMat(a0,a1,a2)) = 0w79 + hashint a0 + hashint a1 + hashint a2
287 :     | hash Cross = 0w83
288 : jhr 1640 | hash (Norm(a0)) = 0w89 + hashty a0
289 :     | hash (Normalize(a0)) = 0w97 + hashint a0
290 :     | hash (Scale(a0)) = 0w101 + hashty a0
291 :     | hash (PrincipleEvec(a0)) = 0w103 + hashty a0
292 :     | hash EigenVecs2x2 = 0w107
293 :     | hash EigenVecs3x3 = 0w109
294 :     | hash EigenVals2x2 = 0w113
295 :     | hash EigenVals3x3 = 0w127
296 :     | hash (Identity(a0)) = 0w131 + hashint a0
297 :     | hash (Zero(a0)) = 0w137 + hashty a0
298 :     | hash (Trace(a0)) = 0w139 + hashint a0
299 :     | hash (Select(a0,a1)) = 0w149 + hashty a0 + hashint a1
300 :     | hash (Index(a0,a1)) = 0w151 + hashty a0 + hashint a1
301 :     | hash (Subscript(a0)) = 0w157 + hashty a0
302 : jhr 1689 | hash (MkDynamic(a0,a1)) = 0w163 + hashty a0 + hashint a1
303 :     | hash (Append(a0)) = 0w167 + hashty a0
304 :     | hash (Prepend(a0)) = 0w173 + hashty a0
305 :     | hash (Concat(a0)) = 0w179 + hashty a0
306 :     | hash (Ceiling(a0)) = 0w181 + hashint a0
307 :     | hash (Floor(a0)) = 0w191 + hashint a0
308 :     | hash (Round(a0)) = 0w193 + hashint a0
309 :     | hash (Trunc(a0)) = 0w197 + hashint a0
310 :     | hash IntToReal = 0w199
311 :     | hash (RealToInt(a0)) = 0w211 + hashint a0
312 :     | hash (VoxelAddress(a0,a1)) = 0w223 + ImageInfo.hash a0 + hashint a1
313 :     | hash (LoadVoxels(a0,a1)) = 0w227 + ImageInfo.hash a0 + hashint a1
314 :     | hash (PosToImgSpace(a0)) = 0w229 + ImageInfo.hash a0
315 :     | hash (TensorToWorldSpace(a0,a1)) = 0w233 + ImageInfo.hash a0 + hashty a1
316 :     | hash (EvalKernel(a0,a1,a2)) = 0w239 + hashint a0 + Kernel.hash a1 + hashint a2
317 :     | hash (LoadImage(a0)) = 0w241 + ImageInfo.hash a0
318 :     | hash (Inside(a0,a1)) = 0w251 + ImageInfo.hash a0 + hashint a1
319 :     | hash (Input(a0,a1,a2)) = 0w257 + hashty a0 + hashstring a1 + hashstring a2
320 :     | hash (InputWithDefault(a0,a1,a2)) = 0w263 + hashty a0 + hashstring a1 + hashstring a2
321 :     | hash (Print(a0)) = 0w269 + hashtys a0
322 : jhr 287
323 :     fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
324 :     | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
325 :     | toString (Mul(a0)) = concat["Mul<", tyToString a0, ">"]
326 :     | toString (Div(a0)) = concat["Div<", tyToString a0, ">"]
327 :     | toString (Neg(a0)) = concat["Neg<", tyToString a0, ">"]
328 : jhr 1116 | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"]
329 : jhr 287 | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]
330 :     | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]
331 :     | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]
332 :     | toString (NEQ(a0)) = concat["NEQ<", tyToString a0, ">"]
333 :     | toString (GT(a0)) = concat["GT<", tyToString a0, ">"]
334 :     | toString (GTE(a0)) = concat["GTE<", tyToString a0, ">"]
335 : jhr 333 | toString Not = "Not"
336 :     | toString Max = "Max"
337 :     | toString Min = "Min"
338 : jhr 1295 | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]
339 : jhr 1116 | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]
340 : jhr 349 | toString (Dot(a0)) = concat["Dot<", intToString a0, ">"]
341 : jhr 1116 | toString (MulVecMat(a0,a1)) = concat["MulVecMat<", intToString a0, ",", intToString a1, ">"]
342 :     | toString (MulMatVec(a0,a1)) = concat["MulMatVec<", intToString a0, ",", intToString a1, ">"]
343 :     | toString (MulMatMat(a0,a1,a2)) = concat["MulMatMat<", intToString a0, ",", intToString a1, ",", intToString a2, ">"]
344 : jhr 287 | toString Cross = "Cross"
345 : jhr 1116 | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"]
346 :     | toString (Normalize(a0)) = concat["Normalize<", intToString a0, ">"]
347 :     | toString (Scale(a0)) = concat["Scale<", tyToString a0, ">"]
348 : jhr 287 | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]
349 : jhr 1640 | toString EigenVecs2x2 = "EigenVecs2x2"
350 :     | toString EigenVecs3x3 = "EigenVecs3x3"
351 :     | toString EigenVals2x2 = "EigenVals2x2"
352 :     | toString EigenVals3x3 = "EigenVals3x3"
353 : jhr 1116 | toString (Identity(a0)) = concat["Identity<", intToString a0, ">"]
354 :     | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"]
355 :     | toString (Trace(a0)) = concat["Trace<", intToString a0, ">"]
356 : jhr 1640 | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]
357 :     | toString (Index(a0,a1)) = concat["Index<", tyToString a0, ",", intToString a1, ">"]
358 : jhr 287 | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]
359 : jhr 1689 | toString (MkDynamic(a0,a1)) = concat["MkDynamic<", tyToString a0, ",", intToString a1, ">"]
360 :     | toString (Append(a0)) = concat["Append<", tyToString a0, ">"]
361 :     | toString (Prepend(a0)) = concat["Prepend<", tyToString a0, ">"]
362 :     | toString (Concat(a0)) = concat["Concat<", tyToString a0, ">"]
363 : jhr 1116 | toString (Ceiling(a0)) = concat["Ceiling<", intToString a0, ">"]
364 : jhr 333 | toString (Floor(a0)) = concat["Floor<", intToString a0, ">"]
365 : jhr 1116 | toString (Round(a0)) = concat["Round<", intToString a0, ">"]
366 :     | toString (Trunc(a0)) = concat["Trunc<", intToString a0, ">"]
367 : jhr 287 | toString IntToReal = "IntToReal"
368 : jhr 1116 | toString (RealToInt(a0)) = concat["RealToInt<", intToString a0, ">"]
369 :     | toString (VoxelAddress(a0,a1)) = concat["VoxelAddress<", ImageInfo.toString a0, ",", intToString a1, ">"]
370 :     | toString (LoadVoxels(a0,a1)) = concat["LoadVoxels<", ImageInfo.toString a0, ",", intToString a1, ">"]
371 : jhr 450 | toString (PosToImgSpace(a0)) = concat["PosToImgSpace<", ImageInfo.toString a0, ">"]
372 : jhr 1116 | toString (TensorToWorldSpace(a0,a1)) = concat["TensorToWorldSpace<", ImageInfo.toString a0, ",", tyToString a1, ">"]
373 : jhr 332 | toString (EvalKernel(a0,a1,a2)) = concat["EvalKernel<", intToString a0, ",", Kernel.toString a1, ",", intToString a2, ">"]
374 : jhr 287 | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]
375 : jhr 1116 | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]
376 : jhr 1301 | toString (Input(a0,a1,a2)) = concat["Input<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
377 :     | toString (InputWithDefault(a0,a1,a2)) = concat["InputWithDefault<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
378 : jhr 1640 | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]
379 : jhr 287
380 :     end
381 :    
382 : jhr 392 structure MidIL = SSAFn(
383 : jhr 1232 val ilName = "mid-il"
384 : jhr 392 structure Ty = MidILTypes
385 :     structure Op = MidOps)
386 : jhr 1116
387 :     structure MidILCensus = CensusFn(MidIL)
388 :    

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