SCM Repository
Annotation of /trunk/src/compiler/mid-il/mid-il.sml
Parent Directory
|
Revision Log
Revision 3349 - (view) (download)
1 : | jhr | 287 | (* mid-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 | 287 | * All rights reserved. |
7 : | * | ||
8 : | * Middle-level version of the Diderot IL. | ||
9 : | * | ||
10 : | * Note: this file is generated from gen/mid-il.spec and gen/mid-il.in. | ||
11 : | *) | ||
12 : | |||
13 : | structure MidOps = | ||
14 : | struct | ||
15 : | |||
16 : | jhr | 1640 | (* required helper functions for types *) |
17 : | jhr | 391 | type ty = MidILTypes.ty |
18 : | val samety = MidILTypes.same | ||
19 : | val hashty = MidILTypes.hash | ||
20 : | val tyToString = MidILTypes.toString | ||
21 : | jhr | 328 | |
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 : | jhr | 332 | fun sameint (i1 : int, i2) = (i1 = i2) |
30 : | fun hashint i = Word.fromInt i | ||
31 : | fun intToString i = Int.toString i | ||
32 : | |||
33 : | jhr | 1116 | (* required helper functions for the string type *) |
34 : | jhr | 287 | fun samestring (s1 : string, s2) = (s1 = s2) |
35 : | val hashstring = HashString.hashString | ||
36 : | fun stringToString s = String.concat["\"", s, "\""] | ||
37 : | |||
38 : | jhr | 2636 | (* required helper functions for the input type *) |
39 : | type input = ty Inputs.input | ||
40 : | val sameinput = Inputs.same | ||
41 : | val hashinput = Inputs.hash | ||
42 : | val inputToString = Inputs.toString | ||
43 : | |||
44 : | jhr | 287 | datatype rator |
45 : | = Add of ty | ||
46 : | | Sub of ty | ||
47 : | | Mul of ty | ||
48 : | | Div of ty | ||
49 : | | Neg of ty | ||
50 : | jhr | 1116 | | Abs of ty |
51 : | jhr | 287 | | LT of ty |
52 : | | LTE of ty | ||
53 : | | EQ of ty | ||
54 : | | NEQ of ty | ||
55 : | | GT of ty | ||
56 : | | GTE of ty | ||
57 : | jhr | 333 | | Not |
58 : | | Max | ||
59 : | | Min | ||
60 : | jhr | 1295 | | Clamp of ty |
61 : | jhr | 1116 | | Lerp of ty |
62 : | jhr | 349 | | Dot of int |
63 : | jhr | 1116 | | MulVecMat of int * int |
64 : | | MulMatVec of int * int | ||
65 : | | MulMatMat of int * int * int | ||
66 : | jhr | 2356 | | MulVecTen3 of int * int * int |
67 : | | MulTen3Vec of int * int * int | ||
68 : | | ColonMul of ty * ty | ||
69 : | jhr | 287 | | Cross |
70 : | jhr | 1116 | | Norm of ty |
71 : | | Normalize of int | ||
72 : | | Scale of ty | ||
73 : | jhr | 287 | | PrincipleEvec of ty |
74 : | jhr | 1640 | | EigenVecs2x2 |
75 : | | EigenVecs3x3 | ||
76 : | | EigenVals2x2 | ||
77 : | | EigenVals3x3 | ||
78 : | jhr | 1116 | | Identity of int |
79 : | | Zero of ty | ||
80 : | | Trace of int | ||
81 : | jhr | 2356 | | Transpose of int * int |
82 : | jhr | 1640 | | Select of ty * int |
83 : | | Index of ty * int | ||
84 : | jhr | 287 | | Subscript of ty |
85 : | jhr | 1116 | | Ceiling of int |
86 : | jhr | 333 | | Floor of int |
87 : | jhr | 1116 | | Round of int |
88 : | | Trunc of int | ||
89 : | jhr | 287 | | IntToReal |
90 : | jhr | 1116 | | RealToInt of int |
91 : | | VoxelAddress of ImageInfo.info * int | ||
92 : | | LoadVoxels of ImageInfo.info * int | ||
93 : | jhr | 450 | | PosToImgSpace of ImageInfo.info |
94 : | jhr | 1116 | | TensorToWorldSpace of ImageInfo.info * ty |
95 : | jhr | 328 | | EvalKernel of int * Kernel.kernel * int |
96 : | jhr | 1116 | | Inside of ImageInfo.info * int |
97 : | jhr | 2636 | | LoadImage of ty * string * ImageInfo.info |
98 : | | Input of input | ||
99 : | jhr | 1640 | | Print of tys |
100 : | jhr | 287 | |
101 : | jhr | 1640 | fun resultArity (Add _) = 1 |
102 : | | resultArity (Sub _) = 1 | ||
103 : | | resultArity (Mul _) = 1 | ||
104 : | | resultArity (Div _) = 1 | ||
105 : | | resultArity (Neg _) = 1 | ||
106 : | | resultArity (Abs _) = 1 | ||
107 : | | resultArity (LT _) = 1 | ||
108 : | | resultArity (LTE _) = 1 | ||
109 : | | resultArity (EQ _) = 1 | ||
110 : | | resultArity (NEQ _) = 1 | ||
111 : | | resultArity (GT _) = 1 | ||
112 : | | resultArity (GTE _) = 1 | ||
113 : | | resultArity Not = 1 | ||
114 : | | resultArity Max = 1 | ||
115 : | | resultArity Min = 1 | ||
116 : | | resultArity (Clamp _) = 1 | ||
117 : | | resultArity (Lerp _) = 1 | ||
118 : | | resultArity (Dot _) = 1 | ||
119 : | | resultArity (MulVecMat _) = 1 | ||
120 : | | resultArity (MulMatVec _) = 1 | ||
121 : | | resultArity (MulMatMat _) = 1 | ||
122 : | jhr | 2356 | | resultArity (MulVecTen3 _) = 1 |
123 : | | resultArity (MulTen3Vec _) = 1 | ||
124 : | | resultArity (ColonMul _) = 1 | ||
125 : | jhr | 1640 | | resultArity Cross = 1 |
126 : | | resultArity (Norm _) = 1 | ||
127 : | | resultArity (Normalize _) = 1 | ||
128 : | | resultArity (Scale _) = 1 | ||
129 : | | resultArity (PrincipleEvec _) = 1 | ||
130 : | | resultArity EigenVecs2x2 = 1 | ||
131 : | | resultArity EigenVecs3x3 = 1 | ||
132 : | | resultArity EigenVals2x2 = 1 | ||
133 : | | resultArity EigenVals3x3 = 1 | ||
134 : | | resultArity (Identity _) = 1 | ||
135 : | | resultArity (Zero _) = 1 | ||
136 : | | resultArity (Trace _) = 1 | ||
137 : | jhr | 2356 | | resultArity (Transpose _) = 1 |
138 : | jhr | 1640 | | resultArity (Select _) = 1 |
139 : | | resultArity (Index _) = 1 | ||
140 : | | resultArity (Subscript _) = 1 | ||
141 : | | resultArity (Ceiling _) = 1 | ||
142 : | | resultArity (Floor _) = 1 | ||
143 : | | resultArity (Round _) = 1 | ||
144 : | | resultArity (Trunc _) = 1 | ||
145 : | | resultArity IntToReal = 1 | ||
146 : | | resultArity (RealToInt _) = 1 | ||
147 : | | resultArity (VoxelAddress _) = 1 | ||
148 : | | resultArity (LoadVoxels _) = 1 | ||
149 : | | resultArity (PosToImgSpace _) = 1 | ||
150 : | | resultArity (TensorToWorldSpace _) = 1 | ||
151 : | | resultArity (EvalKernel _) = 1 | ||
152 : | jhr | 2636 | | resultArity (Inside _) = 1 |
153 : | jhr | 1640 | | resultArity (LoadImage _) = 1 |
154 : | jhr | 2636 | | resultArity (Input _) = 0 |
155 : | jhr | 1640 | | 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 | 2356 | | arity (MulVecTen3 _) = 2 |
179 : | | arity (MulTen3Vec _) = 2 | ||
180 : | | arity (ColonMul _) = 2 | ||
181 : | jhr | 287 | | arity Cross = 2 |
182 : | | arity (Norm _) = 1 | ||
183 : | jhr | 1116 | | arity (Normalize _) = 1 |
184 : | jhr | 287 | | arity (Scale _) = 2 |
185 : | | 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 (Identity _) = 0 |
191 : | | arity (Zero _) = 0 | ||
192 : | | arity (Trace _) = 1 | ||
193 : | jhr | 2356 | | arity (Transpose _) = 1 |
194 : | jhr | 1640 | | arity (Select _) = 1 |
195 : | | arity (Index _) = 1 | ||
196 : | jhr | 287 | | arity (Subscript _) = 2 |
197 : | jhr | 1116 | | arity (Ceiling _) = 1 |
198 : | jhr | 333 | | arity (Floor _) = 1 |
199 : | jhr | 1116 | | arity (Round _) = 1 |
200 : | | arity (Trunc _) = 1 | ||
201 : | jhr | 287 | | arity IntToReal = 1 |
202 : | jhr | 1116 | | arity (RealToInt _) = 1 |
203 : | jhr | 287 | | arity (VoxelAddress _) = ~1 |
204 : | | arity (LoadVoxels _) = 1 | ||
205 : | jhr | 1116 | | arity (PosToImgSpace _) = 2 |
206 : | | arity (TensorToWorldSpace _) = 2 | ||
207 : | jhr | 328 | | arity (EvalKernel _) = 1 |
208 : | jhr | 1116 | | arity (Inside _) = 2 |
209 : | jhr | 2636 | | arity (LoadImage _) = 0 |
210 : | jhr | 287 | | arity (Input _) = 0 |
211 : | jhr | 1640 | | arity (Print _) = ~1 |
212 : | jhr | 287 | |
213 : | jhr | 2642 | fun isPure (Input _) = false |
214 : | | isPure (Print _) = false | ||
215 : | jhr | 2356 | | isPure _ = true |
216 : | |||
217 : | jhr | 287 | 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 | 2356 | | 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 : | | same (ColonMul(a0,a1), ColonMul(b0,b1)) = samety(a0, b0) andalso samety(a1, b1) | ||
241 : | jhr | 287 | | same (Cross, Cross) = true |
242 : | jhr | 1116 | | same (Norm(a0), Norm(b0)) = samety(a0, b0) |
243 : | | same (Normalize(a0), Normalize(b0)) = sameint(a0, b0) | ||
244 : | | same (Scale(a0), Scale(b0)) = samety(a0, b0) | ||
245 : | jhr | 287 | | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0) |
246 : | jhr | 1640 | | same (EigenVecs2x2, EigenVecs2x2) = true |
247 : | | same (EigenVecs3x3, EigenVecs3x3) = true | ||
248 : | | same (EigenVals2x2, EigenVals2x2) = true | ||
249 : | | same (EigenVals3x3, EigenVals3x3) = true | ||
250 : | jhr | 1116 | | same (Identity(a0), Identity(b0)) = sameint(a0, b0) |
251 : | | same (Zero(a0), Zero(b0)) = samety(a0, b0) | ||
252 : | | same (Trace(a0), Trace(b0)) = sameint(a0, b0) | ||
253 : | jhr | 2356 | | same (Transpose(a0,a1), Transpose(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1) |
254 : | jhr | 1640 | | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1) |
255 : | | same (Index(a0,a1), Index(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1) | ||
256 : | jhr | 287 | | same (Subscript(a0), Subscript(b0)) = samety(a0, b0) |
257 : | jhr | 1116 | | same (Ceiling(a0), Ceiling(b0)) = sameint(a0, b0) |
258 : | jhr | 333 | | same (Floor(a0), Floor(b0)) = sameint(a0, b0) |
259 : | jhr | 1116 | | same (Round(a0), Round(b0)) = sameint(a0, b0) |
260 : | | same (Trunc(a0), Trunc(b0)) = sameint(a0, b0) | ||
261 : | jhr | 287 | | same (IntToReal, IntToReal) = true |
262 : | jhr | 1116 | | same (RealToInt(a0), RealToInt(b0)) = sameint(a0, b0) |
263 : | | same (VoxelAddress(a0,a1), VoxelAddress(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1) | ||
264 : | | same (LoadVoxels(a0,a1), LoadVoxels(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1) | ||
265 : | jhr | 450 | | same (PosToImgSpace(a0), PosToImgSpace(b0)) = ImageInfo.same(a0, b0) |
266 : | jhr | 1116 | | same (TensorToWorldSpace(a0,a1), TensorToWorldSpace(b0,b1)) = ImageInfo.same(a0, b0) andalso samety(a1, b1) |
267 : | jhr | 328 | | same (EvalKernel(a0,a1,a2), EvalKernel(b0,b1,b2)) = sameint(a0, b0) andalso Kernel.same(a1, b1) andalso sameint(a2, b2) |
268 : | jhr | 1116 | | same (Inside(a0,a1), Inside(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1) |
269 : | jhr | 2636 | | same (LoadImage(a0,a1,a2), LoadImage(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso ImageInfo.same(a2, b2) |
270 : | | same (Input(a0), Input(b0)) = sameinput(a0, b0) | ||
271 : | jhr | 1640 | | same (Print(a0), Print(b0)) = sametys(a0, b0) |
272 : | jhr | 287 | | same _ = false |
273 : | |||
274 : | fun hash (Add(a0)) = 0w3 + hashty a0 | ||
275 : | | hash (Sub(a0)) = 0w5 + hashty a0 | ||
276 : | | hash (Mul(a0)) = 0w7 + hashty a0 | ||
277 : | | hash (Div(a0)) = 0w11 + hashty a0 | ||
278 : | | hash (Neg(a0)) = 0w13 + hashty a0 | ||
279 : | jhr | 1116 | | hash (Abs(a0)) = 0w17 + hashty a0 |
280 : | | hash (LT(a0)) = 0w19 + hashty a0 | ||
281 : | | hash (LTE(a0)) = 0w23 + hashty a0 | ||
282 : | | hash (EQ(a0)) = 0w29 + hashty a0 | ||
283 : | | hash (NEQ(a0)) = 0w31 + hashty a0 | ||
284 : | | hash (GT(a0)) = 0w37 + hashty a0 | ||
285 : | | hash (GTE(a0)) = 0w41 + hashty a0 | ||
286 : | | hash Not = 0w43 | ||
287 : | | hash Max = 0w47 | ||
288 : | | hash Min = 0w53 | ||
289 : | jhr | 1295 | | hash (Clamp(a0)) = 0w59 + hashty a0 |
290 : | | hash (Lerp(a0)) = 0w61 + hashty a0 | ||
291 : | | hash (Dot(a0)) = 0w67 + hashint a0 | ||
292 : | | hash (MulVecMat(a0,a1)) = 0w71 + hashint a0 + hashint a1 | ||
293 : | | hash (MulMatVec(a0,a1)) = 0w73 + hashint a0 + hashint a1 | ||
294 : | | hash (MulMatMat(a0,a1,a2)) = 0w79 + hashint a0 + hashint a1 + hashint a2 | ||
295 : | jhr | 2356 | | hash (MulVecTen3(a0,a1,a2)) = 0w83 + hashint a0 + hashint a1 + hashint a2 |
296 : | | hash (MulTen3Vec(a0,a1,a2)) = 0w89 + hashint a0 + hashint a1 + hashint a2 | ||
297 : | | hash (ColonMul(a0,a1)) = 0w97 + hashty a0 + hashty a1 | ||
298 : | | hash Cross = 0w101 | ||
299 : | | hash (Norm(a0)) = 0w103 + hashty a0 | ||
300 : | | hash (Normalize(a0)) = 0w107 + hashint a0 | ||
301 : | | hash (Scale(a0)) = 0w109 + hashty a0 | ||
302 : | | hash (PrincipleEvec(a0)) = 0w113 + hashty a0 | ||
303 : | | hash EigenVecs2x2 = 0w127 | ||
304 : | | hash EigenVecs3x3 = 0w131 | ||
305 : | | hash EigenVals2x2 = 0w137 | ||
306 : | | hash EigenVals3x3 = 0w139 | ||
307 : | | hash (Identity(a0)) = 0w149 + hashint a0 | ||
308 : | | hash (Zero(a0)) = 0w151 + hashty a0 | ||
309 : | | hash (Trace(a0)) = 0w157 + hashint a0 | ||
310 : | | hash (Transpose(a0,a1)) = 0w163 + hashint a0 + hashint a1 | ||
311 : | | hash (Select(a0,a1)) = 0w167 + hashty a0 + hashint a1 | ||
312 : | | hash (Index(a0,a1)) = 0w173 + hashty a0 + hashint a1 | ||
313 : | | hash (Subscript(a0)) = 0w179 + hashty a0 | ||
314 : | | hash (Ceiling(a0)) = 0w181 + hashint a0 | ||
315 : | | hash (Floor(a0)) = 0w191 + hashint a0 | ||
316 : | | hash (Round(a0)) = 0w193 + hashint a0 | ||
317 : | | hash (Trunc(a0)) = 0w197 + hashint a0 | ||
318 : | | hash IntToReal = 0w199 | ||
319 : | | hash (RealToInt(a0)) = 0w211 + hashint a0 | ||
320 : | | hash (VoxelAddress(a0,a1)) = 0w223 + ImageInfo.hash a0 + hashint a1 | ||
321 : | | hash (LoadVoxels(a0,a1)) = 0w227 + ImageInfo.hash a0 + hashint a1 | ||
322 : | | hash (PosToImgSpace(a0)) = 0w229 + ImageInfo.hash a0 | ||
323 : | | hash (TensorToWorldSpace(a0,a1)) = 0w233 + ImageInfo.hash a0 + hashty a1 | ||
324 : | | hash (EvalKernel(a0,a1,a2)) = 0w239 + hashint a0 + Kernel.hash a1 + hashint a2 | ||
325 : | jhr | 2636 | | hash (Inside(a0,a1)) = 0w241 + ImageInfo.hash a0 + hashint a1 |
326 : | | hash (LoadImage(a0,a1,a2)) = 0w251 + hashty a0 + hashstring a1 + ImageInfo.hash a2 | ||
327 : | | hash (Input(a0)) = 0w257 + hashinput a0 | ||
328 : | | hash (Print(a0)) = 0w263 + hashtys a0 | ||
329 : | jhr | 287 | |
330 : | fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"] | ||
331 : | | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"] | ||
332 : | | toString (Mul(a0)) = concat["Mul<", tyToString a0, ">"] | ||
333 : | | toString (Div(a0)) = concat["Div<", tyToString a0, ">"] | ||
334 : | | toString (Neg(a0)) = concat["Neg<", tyToString a0, ">"] | ||
335 : | jhr | 1116 | | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"] |
336 : | jhr | 287 | | toString (LT(a0)) = concat["LT<", tyToString a0, ">"] |
337 : | | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"] | ||
338 : | | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"] | ||
339 : | | toString (NEQ(a0)) = concat["NEQ<", tyToString a0, ">"] | ||
340 : | | toString (GT(a0)) = concat["GT<", tyToString a0, ">"] | ||
341 : | | toString (GTE(a0)) = concat["GTE<", tyToString a0, ">"] | ||
342 : | jhr | 333 | | toString Not = "Not" |
343 : | | toString Max = "Max" | ||
344 : | | toString Min = "Min" | ||
345 : | jhr | 1295 | | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"] |
346 : | jhr | 1116 | | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"] |
347 : | jhr | 349 | | toString (Dot(a0)) = concat["Dot<", intToString a0, ">"] |
348 : | jhr | 1116 | | toString (MulVecMat(a0,a1)) = concat["MulVecMat<", intToString a0, ",", intToString a1, ">"] |
349 : | | toString (MulMatVec(a0,a1)) = concat["MulMatVec<", intToString a0, ",", intToString a1, ">"] | ||
350 : | | toString (MulMatMat(a0,a1,a2)) = concat["MulMatMat<", intToString a0, ",", intToString a1, ",", intToString a2, ">"] | ||
351 : | jhr | 2356 | | toString (MulVecTen3(a0,a1,a2)) = concat["MulVecTen3<", intToString a0, ",", intToString a1, ",", intToString a2, ">"] |
352 : | | toString (MulTen3Vec(a0,a1,a2)) = concat["MulTen3Vec<", intToString a0, ",", intToString a1, ",", intToString a2, ">"] | ||
353 : | | toString (ColonMul(a0,a1)) = concat["ColonMul<", tyToString a0, ",", tyToString a1, ">"] | ||
354 : | jhr | 287 | | toString Cross = "Cross" |
355 : | jhr | 1116 | | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"] |
356 : | | toString (Normalize(a0)) = concat["Normalize<", intToString a0, ">"] | ||
357 : | | toString (Scale(a0)) = concat["Scale<", tyToString a0, ">"] | ||
358 : | jhr | 287 | | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"] |
359 : | jhr | 1640 | | toString EigenVecs2x2 = "EigenVecs2x2" |
360 : | | toString EigenVecs3x3 = "EigenVecs3x3" | ||
361 : | | toString EigenVals2x2 = "EigenVals2x2" | ||
362 : | | toString EigenVals3x3 = "EigenVals3x3" | ||
363 : | jhr | 1116 | | toString (Identity(a0)) = concat["Identity<", intToString a0, ">"] |
364 : | | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"] | ||
365 : | | toString (Trace(a0)) = concat["Trace<", intToString a0, ">"] | ||
366 : | jhr | 2356 | | toString (Transpose(a0,a1)) = concat["Transpose<", intToString a0, ",", intToString a1, ">"] |
367 : | jhr | 1640 | | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"] |
368 : | | toString (Index(a0,a1)) = concat["Index<", tyToString a0, ",", intToString a1, ">"] | ||
369 : | jhr | 287 | | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"] |
370 : | jhr | 1116 | | toString (Ceiling(a0)) = concat["Ceiling<", intToString a0, ">"] |
371 : | jhr | 333 | | toString (Floor(a0)) = concat["Floor<", intToString a0, ">"] |
372 : | jhr | 1116 | | toString (Round(a0)) = concat["Round<", intToString a0, ">"] |
373 : | | toString (Trunc(a0)) = concat["Trunc<", intToString a0, ">"] | ||
374 : | jhr | 287 | | toString IntToReal = "IntToReal" |
375 : | jhr | 1116 | | toString (RealToInt(a0)) = concat["RealToInt<", intToString a0, ">"] |
376 : | | toString (VoxelAddress(a0,a1)) = concat["VoxelAddress<", ImageInfo.toString a0, ",", intToString a1, ">"] | ||
377 : | | toString (LoadVoxels(a0,a1)) = concat["LoadVoxels<", ImageInfo.toString a0, ",", intToString a1, ">"] | ||
378 : | jhr | 450 | | toString (PosToImgSpace(a0)) = concat["PosToImgSpace<", ImageInfo.toString a0, ">"] |
379 : | jhr | 1116 | | toString (TensorToWorldSpace(a0,a1)) = concat["TensorToWorldSpace<", ImageInfo.toString a0, ",", tyToString a1, ">"] |
380 : | jhr | 332 | | toString (EvalKernel(a0,a1,a2)) = concat["EvalKernel<", intToString a0, ",", Kernel.toString a1, ",", intToString a2, ">"] |
381 : | jhr | 1116 | | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"] |
382 : | jhr | 2636 | | toString (LoadImage(a0,a1,a2)) = concat["LoadImage<", tyToString a0, ",", stringToString a1, ",", ImageInfo.toString a2, ">"] |
383 : | | toString (Input(a0)) = concat["Input<", inputToString a0, ">"] | ||
384 : | jhr | 1640 | | toString (Print(a0)) = concat["Print<", tysToString a0, ">"] |
385 : | jhr | 287 | |
386 : | end | ||
387 : | |||
388 : | jhr | 392 | structure MidIL = SSAFn( |
389 : | jhr | 1232 | val ilName = "mid-il" |
390 : | jhr | 392 | structure Ty = MidILTypes |
391 : | structure Op = MidOps) | ||
392 : | jhr | 1116 | |
393 : | structure MidILCensus = CensusFn(MidIL) | ||
394 : |
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |