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

SCM Repository

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

Diff of /branches/pure-cfg/src/compiler/mid-il/mid-il.sml

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

revision 1547, Thu Oct 20 14:37:18 2011 UTC revision 1548, Thu Oct 20 14:37:47 2011 UTC
# Line 54  Line 54 
54        | Normalize of int        | Normalize of int
55        | Scale of ty        | Scale of ty
56        | PrincipleEvec of ty        | PrincipleEvec of ty
57        | Eigen2x2        | EigenVecs2x2
58        | Eigen3x3        | EigenVecs3x3
59          | EigenVals2x2
60          | EigenVals3x3
61        | Identity of int        | Identity of int
62        | Zero of ty        | Zero of ty
63        | Trace of int        | Trace of int
# Line 78  Line 80 
80        | Input of ty * string * string        | Input of ty * string * string
81        | InputWithDefault of ty * string * string        | InputWithDefault of ty * string * string
82    
83        fun resultArity (Add _) = 1
84          | resultArity (Sub _) = 1
85          | resultArity (Mul _) = 1
86          | resultArity (Div _) = 1
87          | resultArity (Neg _) = 1
88          | resultArity (Abs _) = 1
89          | resultArity (LT _) = 1
90          | resultArity (LTE _) = 1
91          | resultArity (EQ _) = 1
92          | resultArity (NEQ _) = 1
93          | resultArity (GT _) = 1
94          | resultArity (GTE _) = 1
95          | resultArity Not = 1
96          | resultArity Max = 1
97          | resultArity Min = 1
98          | resultArity (Clamp _) = 1
99          | resultArity (Lerp _) = 1
100          | resultArity (Dot _) = 1
101          | resultArity (MulVecMat _) = 1
102          | resultArity (MulMatVec _) = 1
103          | resultArity (MulMatMat _) = 1
104          | resultArity Cross = 1
105          | resultArity (Norm _) = 1
106          | resultArity (Normalize _) = 1
107          | resultArity (Scale _) = 1
108          | resultArity (PrincipleEvec _) = 1
109          | resultArity EigenVecs2x2 = 1
110          | resultArity EigenVecs3x3 = 1
111          | resultArity EigenVals2x2 = 1
112          | resultArity EigenVals3x3 = 1
113          | resultArity (Identity _) = 1
114          | resultArity (Zero _) = 1
115          | resultArity (Trace _) = 1
116          | resultArity (Select _) = 1
117          | resultArity (Index _) = 1
118          | resultArity (Subscript _) = 1
119          | resultArity (Ceiling _) = 1
120          | resultArity (Floor _) = 1
121          | resultArity (Round _) = 1
122          | resultArity (Trunc _) = 1
123          | resultArity IntToReal = 1
124          | resultArity (RealToInt _) = 1
125          | resultArity (VoxelAddress _) = 1
126          | resultArity (LoadVoxels _) = 1
127          | resultArity (PosToImgSpace _) = 1
128          | resultArity (TensorToWorldSpace _) = 1
129          | resultArity (EvalKernel _) = 1
130          | resultArity (LoadImage _) = 1
131          | resultArity (Inside _) = 1
132          | resultArity (Input _) = 1
133          | resultArity (InputWithDefault _) = 1
134    
135      fun arity (Add _) = 2      fun arity (Add _) = 2
136        | arity (Sub _) = 2        | arity (Sub _) = 2
137        | arity (Mul _) = 2        | arity (Mul _) = 2
# Line 104  Line 158 
158        | arity (Normalize _) = 1        | arity (Normalize _) = 1
159        | arity (Scale _) = 2        | arity (Scale _) = 2
160        | arity (PrincipleEvec _) = 2        | arity (PrincipleEvec _) = 2
161        | arity Eigen2x2 = 1        | arity EigenVecs2x2 = 1
162        | arity Eigen3x3 = 1        | arity EigenVecs3x3 = 1
163          | arity EigenVals2x2 = 1
164          | arity EigenVals3x3 = 1
165        | arity (Identity _) = 0        | arity (Identity _) = 0
166        | arity (Zero _) = 0        | arity (Zero _) = 0
167        | arity (Trace _) = 1        | arity (Trace _) = 1
# Line 154  Line 210 
210        | same (Normalize(a0), Normalize(b0)) = sameint(a0, b0)        | same (Normalize(a0), Normalize(b0)) = sameint(a0, b0)
211        | same (Scale(a0), Scale(b0)) = samety(a0, b0)        | same (Scale(a0), Scale(b0)) = samety(a0, b0)
212        | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)        | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)
213        | same (Eigen2x2, Eigen2x2) = true        | same (EigenVecs2x2, EigenVecs2x2) = true
214        | same (Eigen3x3, Eigen3x3) = true        | same (EigenVecs3x3, EigenVecs3x3) = true
215          | same (EigenVals2x2, EigenVals2x2) = true
216          | same (EigenVals3x3, EigenVals3x3) = true
217        | same (Identity(a0), Identity(b0)) = sameint(a0, b0)        | same (Identity(a0), Identity(b0)) = sameint(a0, b0)
218        | same (Zero(a0), Zero(b0)) = samety(a0, b0)        | same (Zero(a0), Zero(b0)) = samety(a0, b0)
219        | same (Trace(a0), Trace(b0)) = sameint(a0, b0)        | same (Trace(a0), Trace(b0)) = sameint(a0, b0)
# Line 205  Line 263 
263        | hash (Normalize(a0)) = 0w97 + hashint a0        | hash (Normalize(a0)) = 0w97 + hashint a0
264        | hash (Scale(a0)) = 0w101 + hashty a0        | hash (Scale(a0)) = 0w101 + hashty a0
265        | hash (PrincipleEvec(a0)) = 0w103 + hashty a0        | hash (PrincipleEvec(a0)) = 0w103 + hashty a0
266        | hash Eigen2x2 = 0w107        | hash EigenVecs2x2 = 0w107
267        | hash Eigen3x3 = 0w109        | hash EigenVecs3x3 = 0w109
268        | hash (Identity(a0)) = 0w113 + hashint a0        | hash EigenVals2x2 = 0w113
269        | hash (Zero(a0)) = 0w127 + hashty a0        | hash EigenVals3x3 = 0w127
270        | hash (Trace(a0)) = 0w131 + hashint a0        | hash (Identity(a0)) = 0w131 + hashint a0
271        | hash (Select(a0,a1)) = 0w137 + hashty a0 + hashint a1        | hash (Zero(a0)) = 0w137 + hashty a0
272        | hash (Index(a0,a1)) = 0w139 + hashty a0 + hashint a1        | hash (Trace(a0)) = 0w139 + hashint a0
273        | hash (Subscript(a0)) = 0w149 + hashty a0        | hash (Select(a0,a1)) = 0w149 + hashty a0 + hashint a1
274        | hash (Ceiling(a0)) = 0w151 + hashint a0        | hash (Index(a0,a1)) = 0w151 + hashty a0 + hashint a1
275        | hash (Floor(a0)) = 0w157 + hashint a0        | hash (Subscript(a0)) = 0w157 + hashty a0
276        | hash (Round(a0)) = 0w163 + hashint a0        | hash (Ceiling(a0)) = 0w163 + hashint a0
277        | hash (Trunc(a0)) = 0w167 + hashint a0        | hash (Floor(a0)) = 0w167 + hashint a0
278        | hash IntToReal = 0w173        | hash (Round(a0)) = 0w173 + hashint a0
279        | hash (RealToInt(a0)) = 0w179 + hashint a0        | hash (Trunc(a0)) = 0w179 + hashint a0
280        | hash (VoxelAddress(a0,a1)) = 0w181 + ImageInfo.hash a0 + hashint a1        | hash IntToReal = 0w181
281        | hash (LoadVoxels(a0,a1)) = 0w191 + ImageInfo.hash a0 + hashint a1        | hash (RealToInt(a0)) = 0w191 + hashint a0
282        | hash (PosToImgSpace(a0)) = 0w193 + ImageInfo.hash a0        | hash (VoxelAddress(a0,a1)) = 0w193 + ImageInfo.hash a0 + hashint a1
283        | hash (TensorToWorldSpace(a0,a1)) = 0w197 + ImageInfo.hash a0 + hashty a1        | hash (LoadVoxels(a0,a1)) = 0w197 + ImageInfo.hash a0 + hashint a1
284        | hash (EvalKernel(a0,a1,a2)) = 0w199 + hashint a0 + Kernel.hash a1 + hashint a2        | hash (PosToImgSpace(a0)) = 0w199 + ImageInfo.hash a0
285        | hash (LoadImage(a0)) = 0w211 + ImageInfo.hash a0        | hash (TensorToWorldSpace(a0,a1)) = 0w211 + ImageInfo.hash a0 + hashty a1
286        | hash (Inside(a0,a1)) = 0w223 + ImageInfo.hash a0 + hashint a1        | hash (EvalKernel(a0,a1,a2)) = 0w223 + hashint a0 + Kernel.hash a1 + hashint a2
287        | hash (Input(a0,a1,a2)) = 0w227 + hashty a0 + hashstring a1 + hashstring a2        | hash (LoadImage(a0)) = 0w227 + ImageInfo.hash a0
288        | hash (InputWithDefault(a0,a1,a2)) = 0w229 + hashty a0 + hashstring a1 + hashstring a2        | hash (Inside(a0,a1)) = 0w229 + ImageInfo.hash a0 + hashint a1
289          | hash (Input(a0,a1,a2)) = 0w233 + hashty a0 + hashstring a1 + hashstring a2
290          | hash (InputWithDefault(a0,a1,a2)) = 0w239 + hashty a0 + hashstring a1 + hashstring a2
291    
292      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
293        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
# Line 255  Line 315 
315        | toString (Normalize(a0)) = concat["Normalize<", intToString a0, ">"]        | toString (Normalize(a0)) = concat["Normalize<", intToString a0, ">"]
316        | toString (Scale(a0)) = concat["Scale<", tyToString a0, ">"]        | toString (Scale(a0)) = concat["Scale<", tyToString a0, ">"]
317        | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]        | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]
318        | toString Eigen2x2 = "Eigen2x2"        | toString EigenVecs2x2 = "EigenVecs2x2"
319        | toString Eigen3x3 = "Eigen3x3"        | toString EigenVecs3x3 = "EigenVecs3x3"
320          | toString EigenVals2x2 = "EigenVals2x2"
321          | toString EigenVals3x3 = "EigenVals3x3"
322        | toString (Identity(a0)) = concat["Identity<", intToString a0, ">"]        | toString (Identity(a0)) = concat["Identity<", intToString a0, ">"]
323        | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"]        | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"]
324        | toString (Trace(a0)) = concat["Trace<", intToString a0, ">"]        | toString (Trace(a0)) = concat["Trace<", intToString a0, ">"]

Legend:
Removed from v.1547  
changed lines
  Added in v.1548

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