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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

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