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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 287, Fri Aug 13 21:40:04 2010 UTC revision 1301, Thu Jun 9 23:58:40 2011 UTC
# Line 1  Line 1 
1  (* mid-il.sml  (* mid-il.sml
2   *   *
3   * COPYRIGHT (c) 2010 The Diderot Project (http://diderot.cs.uchicago.edu)   * COPYRIGHT (c) 2010 The Diderot Project (http://diderot-language.cs.uchicago.edu)
4   * All rights reserved.   * All rights reserved.
5   *   *
6   * Middle-level version of the Diderot IL.   * Middle-level version of the Diderot IL.
# Line 11  Line 11 
11  structure MidOps =  structure MidOps =
12    struct    struct
13    
14      datatype ty = BoolTy | StringTy | IntTy | VecTy of int      type ty = MidILTypes.ty
15    
16      fun samety (ty1 : ty, ty2) = (ty1 = ty2)      val samety = MidILTypes.same
17      fun hashty BoolTy = 0w1      val hashty = MidILTypes.hash
18        | hashty StringTy = 0w2      val tyToString = MidILTypes.toString
19        | hashty IntTy = 0w3  
20        | hashty (VecTy d) = Word.fromInt d + 0w4    (* required helper functions for the int type *)
21      fun tyToString BoolTy = "bool"      fun sameint (i1 : int, i2) = (i1 = i2)
22        | tyToString StringTy = "string"      fun hashint i = Word.fromInt i
23        | tyToString IntTy = "int"      fun intToString i = Int.toString i
       | tyToString (VecTy 0) = "real"  
       | tyToString (VecTy d) = "vec" ^ Int.toString d  
24    
25      (* required helper functions for the string type *)
26      fun samestring (s1 : string, s2) = (s1 = s2)      fun samestring (s1 : string, s2) = (s1 = s2)
27      val hashstring = HashString.hashString      val hashstring = HashString.hashString
28      fun stringToString s = String.concat["\"", s, "\""]      fun stringToString s = String.concat["\"", s, "\""]
# Line 34  Line 33 
33        | Mul of ty        | Mul of ty
34        | Div of ty        | Div of ty
35        | Neg of ty        | Neg of ty
36          | Abs of ty
37        | LT of ty        | LT of ty
38        | LTE of ty        | LTE of ty
39        | EQ of ty        | EQ of ty
40        | NEQ of ty        | NEQ of ty
41        | GT of ty        | GT of ty
42        | GTE of ty        | GTE of ty
43        | Dot of ty        | Not
44          | Max
45          | Min
46          | Clamp of ty
47          | Lerp of ty
48          | Dot of int
49          | MulVecMat of int * int
50          | MulMatVec of int * int
51          | MulMatMat of int * int * int
52        | Cross        | Cross
53        | Select of int        | Select of ty * int
54        | Norm of ty        | Norm of ty
55          | Normalize of int
56        | Scale of ty        | Scale of ty
       | InvScale of ty  
57        | CL        | CL
58        | PrincipleEvec of ty        | PrincipleEvec of ty
59          | Identity of int
60          | Zero of ty
61          | Trace of int
62        | Subscript of ty        | Subscript of ty
63        | Max        | Ceiling of int
64        | Min        | Floor of int
65        | Sin        | Round of int
66        | Cos        | Trunc of int
       | Pow  
       | Not  
67        | IntToReal        | IntToReal
68        | TruncToInt        | RealToInt of int
69        | RoundToInt        | VoxelAddress of ImageInfo.info * int
70        | CeilToInt        | LoadVoxels of ImageInfo.info * int
71        | FloorToInt        | PosToImgSpace of ImageInfo.info
72        | VoxelAddress of ImageInfo.info        | TensorToWorldSpace of ImageInfo.info * ty
73        | LoadVoxels of RawTypes.ty * int        | EvalKernel of int * Kernel.kernel * int
       | Transform of ImageInfo.info  
       | Kernel of Kernel.kernel  
       | DiffKernel of int  
       | EvalKernel  
74        | LoadImage of ImageInfo.info        | LoadImage of ImageInfo.info
75        | Inside        | Inside of ImageInfo.info * int
76        | Input of string        | Input of ty * string * string
77        | InputWithDefault of string        | InputWithDefault of ty * string * string
78    
79      fun arity (Add _) = 2      fun arity (Add _) = 2
80        | arity (Sub _) = 2        | arity (Sub _) = 2
81        | arity (Mul _) = 2        | arity (Mul _) = 2
82        | arity (Div _) = 2        | arity (Div _) = 2
83        | arity (Neg _) = 1        | arity (Neg _) = 1
84          | arity (Abs _) = 1
85        | arity (LT _) = 2        | arity (LT _) = 2
86        | arity (LTE _) = 2        | arity (LTE _) = 2
87        | arity (EQ _) = 2        | arity (EQ _) = 2
88        | arity (NEQ _) = 2        | arity (NEQ _) = 2
89        | arity (GT _) = 2        | arity (GT _) = 2
90        | arity (GTE _) = 2        | arity (GTE _) = 2
91          | arity Not = 1
92          | arity Max = 2
93          | arity Min = 2
94          | arity (Clamp _) = 3
95          | arity (Lerp _) = 3
96        | arity (Dot _) = 2        | arity (Dot _) = 2
97          | arity (MulVecMat _) = 2
98          | arity (MulMatVec _) = 2
99          | arity (MulMatMat _) = 2
100        | arity Cross = 2        | arity Cross = 2
101        | arity (Select _) = 1        | arity (Select _) = 1
102        | arity (Norm _) = 1        | arity (Norm _) = 1
103          | arity (Normalize _) = 1
104        | arity (Scale _) = 2        | arity (Scale _) = 2
       | arity (InvScale _) = 2  
105        | arity CL = 1        | arity CL = 1
106        | arity (PrincipleEvec _) = 2        | arity (PrincipleEvec _) = 2
107          | arity (Identity _) = 0
108          | arity (Zero _) = 0
109          | arity (Trace _) = 1
110        | arity (Subscript _) = 2        | arity (Subscript _) = 2
111        | arity Max = 2        | arity (Ceiling _) = 1
112        | arity Min = 2        | arity (Floor _) = 1
113        | arity Sin = 1        | arity (Round _) = 1
114        | arity Cos = 1        | arity (Trunc _) = 1
       | arity Pow = 2  
       | arity Not = 1  
115        | arity IntToReal = 1        | arity IntToReal = 1
116        | arity TruncToInt = 1        | arity (RealToInt _) = 1
       | arity RoundToInt = 1  
       | arity CeilToInt = 1  
       | arity FloorToInt = 1  
117        | arity (VoxelAddress _) = ~1        | arity (VoxelAddress _) = ~1
118        | arity (LoadVoxels _) = 1        | arity (LoadVoxels _) = 1
119        | arity (Transform _) = 1        | arity (PosToImgSpace _) = 2
120        | arity (Kernel _) = 0        | arity (TensorToWorldSpace _) = 2
121        | arity (DiffKernel _) = 1        | arity (EvalKernel _) = 1
122        | arity EvalKernel = 2        | arity (LoadImage _) = 1
123        | arity (LoadImage _) = 0        | arity (Inside _) = 2
       | arity Inside = 2  
124        | arity (Input _) = 0        | arity (Input _) = 0
125        | arity (InputWithDefault _) = 1        | arity (InputWithDefault _) = 1
126    
# Line 118  Line 129 
129        | same (Mul(a0), Mul(b0)) = samety(a0, b0)        | same (Mul(a0), Mul(b0)) = samety(a0, b0)
130        | same (Div(a0), Div(b0)) = samety(a0, b0)        | same (Div(a0), Div(b0)) = samety(a0, b0)
131        | same (Neg(a0), Neg(b0)) = samety(a0, b0)        | same (Neg(a0), Neg(b0)) = samety(a0, b0)
132          | same (Abs(a0), Abs(b0)) = samety(a0, b0)
133        | same (LT(a0), LT(b0)) = samety(a0, b0)        | same (LT(a0), LT(b0)) = samety(a0, b0)
134        | same (LTE(a0), LTE(b0)) = samety(a0, b0)        | same (LTE(a0), LTE(b0)) = samety(a0, b0)
135        | same (EQ(a0), EQ(b0)) = samety(a0, b0)        | same (EQ(a0), EQ(b0)) = samety(a0, b0)
136        | same (NEQ(a0), NEQ(b0)) = samety(a0, b0)        | same (NEQ(a0), NEQ(b0)) = samety(a0, b0)
137        | same (GT(a0), GT(b0)) = samety(a0, b0)        | same (GT(a0), GT(b0)) = samety(a0, b0)
138        | same (GTE(a0), GTE(b0)) = samety(a0, b0)        | same (GTE(a0), GTE(b0)) = samety(a0, b0)
139        | same (Dot(a0), Dot(b0)) = samety(a0, b0)        | same (Not, Not) = true
140          | same (Max, Max) = true
141          | same (Min, Min) = true
142          | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)
143          | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)
144          | same (Dot(a0), Dot(b0)) = sameint(a0, b0)
145          | same (MulVecMat(a0,a1), MulVecMat(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)
146          | same (MulMatVec(a0,a1), MulMatVec(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)
147          | same (MulMatMat(a0,a1,a2), MulMatMat(b0,b1,b2)) = sameint(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)
148        | same (Cross, Cross) = true        | same (Cross, Cross) = true
149        | same (Select(a0), Select(b0)) = sameint(a0, b0)        | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
150        | same (Norm(a0), Norm(b0)) = samety(a0, b0)        | same (Norm(a0), Norm(b0)) = samety(a0, b0)
151          | same (Normalize(a0), Normalize(b0)) = sameint(a0, b0)
152        | same (Scale(a0), Scale(b0)) = samety(a0, b0)        | same (Scale(a0), Scale(b0)) = samety(a0, b0)
       | same (InvScale(a0), InvScale(b0)) = samety(a0, b0)  
153        | same (CL, CL) = true        | same (CL, CL) = true
154        | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)        | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)
155          | same (Identity(a0), Identity(b0)) = sameint(a0, b0)
156          | same (Zero(a0), Zero(b0)) = samety(a0, b0)
157          | same (Trace(a0), Trace(b0)) = sameint(a0, b0)
158        | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)        | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)
159        | same (Max, Max) = true        | same (Ceiling(a0), Ceiling(b0)) = sameint(a0, b0)
160        | same (Min, Min) = true        | same (Floor(a0), Floor(b0)) = sameint(a0, b0)
161        | same (Sin, Sin) = true        | same (Round(a0), Round(b0)) = sameint(a0, b0)
162        | same (Cos, Cos) = true        | same (Trunc(a0), Trunc(b0)) = sameint(a0, b0)
       | same (Pow, Pow) = true  
       | same (Not, Not) = true  
163        | same (IntToReal, IntToReal) = true        | same (IntToReal, IntToReal) = true
164        | same (TruncToInt, TruncToInt) = true        | same (RealToInt(a0), RealToInt(b0)) = sameint(a0, b0)
165        | same (RoundToInt, RoundToInt) = true        | same (VoxelAddress(a0,a1), VoxelAddress(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
166        | same (CeilToInt, CeilToInt) = true        | same (LoadVoxels(a0,a1), LoadVoxels(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
167        | same (FloorToInt, FloorToInt) = true        | same (PosToImgSpace(a0), PosToImgSpace(b0)) = ImageInfo.same(a0, b0)
168        | same (VoxelAddress(a0), VoxelAddress(b0)) = ImageInfo.same(a0, b0)        | same (TensorToWorldSpace(a0,a1), TensorToWorldSpace(b0,b1)) = ImageInfo.same(a0, b0) andalso samety(a1, b1)
169        | same (LoadVoxels(a0,a1), LoadVoxels(b0,b1)) = RawTypes.same(a0, b0) andalso sameint(a1, b1)        | same (EvalKernel(a0,a1,a2), EvalKernel(b0,b1,b2)) = sameint(a0, b0) andalso Kernel.same(a1, b1) andalso sameint(a2, b2)
       | same (Transform(a0), Transform(b0)) = ImageInfo.same(a0, b0)  
       | same (Kernel(a0), Kernel(b0)) = Kernel.same(a0, b0)  
       | same (DiffKernel(a0), DiffKernel(b0)) = sameint(a0, b0)  
       | same (EvalKernel, EvalKernel) = true  
170        | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)        | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)
171        | same (Inside, Inside) = true        | same (Inside(a0,a1), Inside(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
172        | same (Input(a0), Input(b0)) = samestring(a0, b0)        | same (Input(a0,a1,a2), Input(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
173        | same (InputWithDefault(a0), InputWithDefault(b0)) = samestring(a0, b0)        | same (InputWithDefault(a0,a1,a2), InputWithDefault(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
174        | same _ = false        | same _ = false
175    
176      fun hash (Add(a0)) = 0w3 + hashty a0      fun hash (Add(a0)) = 0w3 + hashty a0
# Line 161  Line 178 
178        | hash (Mul(a0)) = 0w7 + hashty a0        | hash (Mul(a0)) = 0w7 + hashty a0
179        | hash (Div(a0)) = 0w11 + hashty a0        | hash (Div(a0)) = 0w11 + hashty a0
180        | hash (Neg(a0)) = 0w13 + hashty a0        | hash (Neg(a0)) = 0w13 + hashty a0
181        | hash (LT(a0)) = 0w17 + hashty a0        | hash (Abs(a0)) = 0w17 + hashty a0
182        | hash (LTE(a0)) = 0w19 + hashty a0        | hash (LT(a0)) = 0w19 + hashty a0
183        | hash (EQ(a0)) = 0w23 + hashty a0        | hash (LTE(a0)) = 0w23 + hashty a0
184        | hash (NEQ(a0)) = 0w29 + hashty a0        | hash (EQ(a0)) = 0w29 + hashty a0
185        | hash (GT(a0)) = 0w31 + hashty a0        | hash (NEQ(a0)) = 0w31 + hashty a0
186        | hash (GTE(a0)) = 0w37 + hashty a0        | hash (GT(a0)) = 0w37 + hashty a0
187        | hash (Dot(a0)) = 0w41 + hashty a0        | hash (GTE(a0)) = 0w41 + hashty a0
188        | hash Cross = 0w43        | hash Not = 0w43
189        | hash (Select(a0)) = 0w47 + hashint a0        | hash Max = 0w47
190        | hash (Norm(a0)) = 0w53 + hashty a0        | hash Min = 0w53
191        | hash (Scale(a0)) = 0w59 + hashty a0        | hash (Clamp(a0)) = 0w59 + hashty a0
192        | hash (InvScale(a0)) = 0w61 + hashty a0        | hash (Lerp(a0)) = 0w61 + hashty a0
193        | hash CL = 0w67        | hash (Dot(a0)) = 0w67 + hashint a0
194        | hash (PrincipleEvec(a0)) = 0w71 + hashty a0        | hash (MulVecMat(a0,a1)) = 0w71 + hashint a0 + hashint a1
195        | hash (Subscript(a0)) = 0w73 + hashty a0        | hash (MulMatVec(a0,a1)) = 0w73 + hashint a0 + hashint a1
196        | hash Max = 0w79        | hash (MulMatMat(a0,a1,a2)) = 0w79 + hashint a0 + hashint a1 + hashint a2
197        | hash Min = 0w83        | hash Cross = 0w83
198        | hash Sin = 0w89        | hash (Select(a0,a1)) = 0w89 + hashty a0 + hashint a1
199        | hash Cos = 0w97        | hash (Norm(a0)) = 0w97 + hashty a0
200        | hash Pow = 0w101        | hash (Normalize(a0)) = 0w101 + hashint a0
201        | hash Not = 0w103        | hash (Scale(a0)) = 0w103 + hashty a0
202        | hash IntToReal = 0w107        | hash CL = 0w107
203        | hash TruncToInt = 0w109        | hash (PrincipleEvec(a0)) = 0w109 + hashty a0
204        | hash RoundToInt = 0w113        | hash (Identity(a0)) = 0w113 + hashint a0
205        | hash CeilToInt = 0w127        | hash (Zero(a0)) = 0w127 + hashty a0
206        | hash FloorToInt = 0w131        | hash (Trace(a0)) = 0w131 + hashint a0
207        | hash (VoxelAddress(a0)) = 0w137 + ImageInfo.hash a0        | hash (Subscript(a0)) = 0w137 + hashty a0
208        | hash (LoadVoxels(a0,a1)) = 0w139 + RawTypes.hash a0 + hashint a1        | hash (Ceiling(a0)) = 0w139 + hashint a0
209        | hash (Transform(a0)) = 0w149 + ImageInfo.hash a0        | hash (Floor(a0)) = 0w149 + hashint a0
210        | hash (Kernel(a0)) = 0w151 + Kernel.hash a0        | hash (Round(a0)) = 0w151 + hashint a0
211        | hash (DiffKernel(a0)) = 0w157 + hashint a0        | hash (Trunc(a0)) = 0w157 + hashint a0
212        | hash EvalKernel = 0w163        | hash IntToReal = 0w163
213        | hash (LoadImage(a0)) = 0w167 + ImageInfo.hash a0        | hash (RealToInt(a0)) = 0w167 + hashint a0
214        | hash Inside = 0w173        | hash (VoxelAddress(a0,a1)) = 0w173 + ImageInfo.hash a0 + hashint a1
215        | hash (Input(a0)) = 0w179 + hashstring a0        | hash (LoadVoxels(a0,a1)) = 0w179 + ImageInfo.hash a0 + hashint a1
216        | hash (InputWithDefault(a0)) = 0w181 + hashstring a0        | hash (PosToImgSpace(a0)) = 0w181 + ImageInfo.hash a0
217          | hash (TensorToWorldSpace(a0,a1)) = 0w191 + ImageInfo.hash a0 + hashty a1
218          | hash (EvalKernel(a0,a1,a2)) = 0w193 + hashint a0 + Kernel.hash a1 + hashint a2
219          | hash (LoadImage(a0)) = 0w197 + ImageInfo.hash a0
220          | hash (Inside(a0,a1)) = 0w199 + ImageInfo.hash a0 + hashint a1
221          | hash (Input(a0,a1,a2)) = 0w211 + hashty a0 + hashstring a1 + hashstring a2
222          | hash (InputWithDefault(a0,a1,a2)) = 0w223 + hashty a0 + hashstring a1 + hashstring a2
223    
224      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
225        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
226        | toString (Mul(a0)) = concat["Mul<", tyToString a0, ">"]        | toString (Mul(a0)) = concat["Mul<", tyToString a0, ">"]
227        | toString (Div(a0)) = concat["Div<", tyToString a0, ">"]        | toString (Div(a0)) = concat["Div<", tyToString a0, ">"]
228        | toString (Neg(a0)) = concat["Neg<", tyToString a0, ">"]        | toString (Neg(a0)) = concat["Neg<", tyToString a0, ">"]
229          | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"]
230        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]
231        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]
232        | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]        | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]
233        | toString (NEQ(a0)) = concat["NEQ<", tyToString a0, ">"]        | toString (NEQ(a0)) = concat["NEQ<", tyToString a0, ">"]
234        | toString (GT(a0)) = concat["GT<", tyToString a0, ">"]        | toString (GT(a0)) = concat["GT<", tyToString a0, ">"]
235        | toString (GTE(a0)) = concat["GTE<", tyToString a0, ">"]        | toString (GTE(a0)) = concat["GTE<", tyToString a0, ">"]
236        | toString (Dot(a0)) = concat["Dot<", tyToString a0, ">"]        | toString Not = "Not"
237          | toString Max = "Max"
238          | toString Min = "Min"
239          | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]
240          | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]
241          | toString (Dot(a0)) = concat["Dot<", intToString a0, ">"]
242          | toString (MulVecMat(a0,a1)) = concat["MulVecMat<", intToString a0, ",", intToString a1, ">"]
243          | toString (MulMatVec(a0,a1)) = concat["MulMatVec<", intToString a0, ",", intToString a1, ">"]
244          | toString (MulMatMat(a0,a1,a2)) = concat["MulMatMat<", intToString a0, ",", intToString a1, ",", intToString a2, ">"]
245        | toString Cross = "Cross"        | toString Cross = "Cross"
246        | toString (Select(a0)) = concat["Select<", intToString a0, ">"]        | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]
247        | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"]        | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"]
248          | toString (Normalize(a0)) = concat["Normalize<", intToString a0, ">"]
249        | toString (Scale(a0)) = concat["Scale<", tyToString a0, ">"]        | toString (Scale(a0)) = concat["Scale<", tyToString a0, ">"]
       | toString (InvScale(a0)) = concat["InvScale<", tyToString a0, ">"]  
250        | toString CL = "CL"        | toString CL = "CL"
251        | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]        | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]
252          | toString (Identity(a0)) = concat["Identity<", intToString a0, ">"]
253          | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"]
254          | toString (Trace(a0)) = concat["Trace<", intToString a0, ">"]
255        | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]        | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]
256        | toString Max = "Max"        | toString (Ceiling(a0)) = concat["Ceiling<", intToString a0, ">"]
257        | toString Min = "Min"        | toString (Floor(a0)) = concat["Floor<", intToString a0, ">"]
258        | toString Sin = "Sin"        | toString (Round(a0)) = concat["Round<", intToString a0, ">"]
259        | toString Cos = "Cos"        | toString (Trunc(a0)) = concat["Trunc<", intToString a0, ">"]
       | toString Pow = "Pow"  
       | toString Not = "Not"  
260        | toString IntToReal = "IntToReal"        | toString IntToReal = "IntToReal"
261        | toString TruncToInt = "TruncToInt"        | toString (RealToInt(a0)) = concat["RealToInt<", intToString a0, ">"]
262        | toString RoundToInt = "RoundToInt"        | toString (VoxelAddress(a0,a1)) = concat["VoxelAddress<", ImageInfo.toString a0, ",", intToString a1, ">"]
263        | toString CeilToInt = "CeilToInt"        | toString (LoadVoxels(a0,a1)) = concat["LoadVoxels<", ImageInfo.toString a0, ",", intToString a1, ">"]
264        | toString FloorToInt = "FloorToInt"        | toString (PosToImgSpace(a0)) = concat["PosToImgSpace<", ImageInfo.toString a0, ">"]
265        | toString (VoxelAddress(a0)) = concat["VoxelAddress<", ImageInfo.toString a0, ">"]        | toString (TensorToWorldSpace(a0,a1)) = concat["TensorToWorldSpace<", ImageInfo.toString a0, ",", tyToString a1, ">"]
266        | toString (LoadVoxels(a0,a1)) = concat["LoadVoxels<", RawTypes.toString a0",", intToString a0, ">"]        | toString (EvalKernel(a0,a1,a2)) = concat["EvalKernel<", intToString a0, ",", Kernel.toString a1, ",", intToString a2, ">"]
       | toString (Transform(a0)) = concat["Transform<", ImageInfo.toString a0, ">"]  
       | toString (Kernel(a0)) = concat["Kernel<", Kernel.toString a0, ">"]  
       | toString (DiffKernel(a0)) = concat["DiffKernel<", intToString a0, ">"]  
       | toString EvalKernel = "EvalKernel"  
267        | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]        | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]
268        | toString Inside = "Inside"        | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]
269        | toString (Input(a0)) = concat["Input<", stringToString a0, ">"]        | toString (Input(a0,a1,a2)) = concat["Input<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
270        | toString (InputWithDefault(a0)) = concat["InputWithDefault<", stringToString a0, ">"]        | toString (InputWithDefault(a0,a1,a2)) = concat["InputWithDefault<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
271    
272    end    end
273    
274  structure MidIL = SSAFn(MidOps)  structure MidIL = SSAFn(
275      val ilName = "mid-il"
276      structure Ty = MidILTypes
277      structure Op = MidOps)
278    
279    structure MidILCensus = CensusFn(MidIL)
280    

Legend:
Removed from v.287  
changed lines
  Added in v.1301

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