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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/high-il/high-il.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/high-il/high-il.sml

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

revision 2627, Sat May 17 00:44:22 2014 UTC revision 2628, Wed May 21 04:02:06 2014 UTC
# Line 66  Line 66 
66        | PrincipleEvec of ty        | PrincipleEvec of ty
67        | Eigen2x2        | Eigen2x2
68        | Eigen3x3        | Eigen3x3
69          | Zero of ty
70        | Slice of ty * mask        | Slice of ty * mask
71        | TensorSub of ty        | TensorSub of ty
72        | Select of ty * int        | Select of ty * int
# Line 105  Line 106 
106        | resultArity (PrincipleEvec _) = 1        | resultArity (PrincipleEvec _) = 1
107        | resultArity Eigen2x2 = 1        | resultArity Eigen2x2 = 1
108        | resultArity Eigen3x3 = 1        | resultArity Eigen3x3 = 1
109          | resultArity (Zero _) = 1
110        | resultArity (Slice _) = 1        | resultArity (Slice _) = 1
111        | resultArity (TensorSub _) = 1        | resultArity (TensorSub _) = 1
112        | resultArity (Select _) = 1        | resultArity (Select _) = 1
# Line 144  Line 146 
146        | arity (PrincipleEvec _) = 2        | arity (PrincipleEvec _) = 2
147        | arity Eigen2x2 = 1        | arity Eigen2x2 = 1
148        | arity Eigen3x3 = 1        | arity Eigen3x3 = 1
149          | arity (Zero _) = 0
150        | arity (Slice _) = 1        | arity (Slice _) = 1
151        | arity (TensorSub _) = ~1        | arity (TensorSub _) = ~1
152        | arity (Select _) = 1        | arity (Select _) = 1
# Line 186  Line 189 
189        | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)        | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)
190        | same (Eigen2x2, Eigen2x2) = true        | same (Eigen2x2, Eigen2x2) = true
191        | same (Eigen3x3, Eigen3x3) = true        | same (Eigen3x3, Eigen3x3) = true
192          | same (Zero(a0), Zero(b0)) = samety(a0, b0)
193        | same (Slice(a0,a1), Slice(b0,b1)) = samety(a0, b0) andalso samemask(a1, b1)        | same (Slice(a0,a1), Slice(b0,b1)) = samety(a0, b0) andalso samemask(a1, b1)
194        | same (TensorSub(a0), TensorSub(b0)) = samety(a0, b0)        | same (TensorSub(a0), TensorSub(b0)) = samety(a0, b0)
195        | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)        | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
# Line 226  Line 230 
230        | hash (PrincipleEvec(a0)) = 0w79 + hashty a0        | hash (PrincipleEvec(a0)) = 0w79 + hashty a0
231        | hash Eigen2x2 = 0w83        | hash Eigen2x2 = 0w83
232        | hash Eigen3x3 = 0w89        | hash Eigen3x3 = 0w89
233        | hash (Slice(a0,a1)) = 0w97 + hashty a0 + hashmask a1        | hash (Zero(a0)) = 0w97 + hashty a0
234        | hash (TensorSub(a0)) = 0w101 + hashty a0        | hash (Slice(a0,a1)) = 0w101 + hashty a0 + hashmask a1
235        | hash (Select(a0,a1)) = 0w103 + hashty a0 + hashint a1        | hash (TensorSub(a0)) = 0w103 + hashty a0
236        | hash (SeqSub(a0)) = 0w107 + hashty a0        | hash (Select(a0,a1)) = 0w107 + hashty a0 + hashint a1
237        | hash IntToReal = 0w109        | hash (SeqSub(a0)) = 0w109 + hashty a0
238        | hash TruncToInt = 0w113        | hash IntToReal = 0w113
239        | hash RoundToInt = 0w127        | hash TruncToInt = 0w127
240        | hash CeilToInt = 0w131        | hash RoundToInt = 0w131
241        | hash FloorToInt = 0w137        | hash CeilToInt = 0w137
242        | hash (Kernel(a0,a1)) = 0w139 + Kernel.hash a0 + hashint a1        | hash FloorToInt = 0w139
243        | hash (LoadImage(a0)) = 0w149 + ImageInfo.hash a0        | hash (Kernel(a0,a1)) = 0w149 + Kernel.hash a0 + hashint a1
244        | hash (Inside(a0)) = 0w151 + hashint a0        | hash (LoadImage(a0)) = 0w151 + ImageInfo.hash a0
245        | hash (Input(a0,a1,a2)) = 0w157 + hashty a0 + hashstring a1 + hashstring a2        | hash (Inside(a0)) = 0w157 + hashint a0
246        | hash (InputWithDefault(a0,a1,a2)) = 0w163 + hashty a0 + hashstring a1 + hashstring a2        | hash (Input(a0,a1,a2)) = 0w163 + hashty a0 + hashstring a1 + hashstring a2
247        | hash (Print(a0)) = 0w167 + hashtys a0        | hash (InputWithDefault(a0,a1,a2)) = 0w167 + hashty a0 + hashstring a1 + hashstring a2
248          | hash (Print(a0)) = 0w173 + hashtys a0
249    
250      fun toString IAdd = "IAdd"      fun toString IAdd = "IAdd"
251        | toString ISub = "ISub"        | toString ISub = "ISub"
# Line 265  Line 270 
270        | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]        | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]
271        | toString Eigen2x2 = "Eigen2x2"        | toString Eigen2x2 = "Eigen2x2"
272        | toString Eigen3x3 = "Eigen3x3"        | toString Eigen3x3 = "Eigen3x3"
273          | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"]
274        | toString (Slice(a0,a1)) = concat["Slice<", tyToString a0, ",", maskToString a1, ">"]        | toString (Slice(a0,a1)) = concat["Slice<", tyToString a0, ",", maskToString a1, ">"]
275        | toString (TensorSub(a0)) = concat["TensorSub<", tyToString a0, ">"]        | toString (TensorSub(a0)) = concat["TensorSub<", tyToString a0, ">"]
276        | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]        | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]

Legend:
Removed from v.2627  
changed lines
  Added in v.2628

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