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

SCM Repository

[diderot] Annotation of /trunk/src/compiler/high-il/high-il.sml
ViewVC logotype

Annotation of /trunk/src/compiler/high-il/high-il.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3349 - (view) (download)

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

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