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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/tree-ir/tree-ops.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/tree-ir/tree-ops.sml

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

revision 3756, Fri Apr 15 12:53:23 2016 UTC revision 3757, Fri Apr 15 14:30:25 2016 UTC
# Line 81  Line 81 
81        | VSum of shape * int        | VSum of shape * int
82        | VClamp of int        | VClamp of int
83        | VLerp of int        | VLerp of int
84        | baseAddr of ImageInfo.info        | BaseAddr of ImageInfo.info
85        | TensorIndex of bool * shape * ty        | TensorIndex of bool * shape * ty
86        | LT of ty        | LT of ty
87        | LTE of ty        | LTE of ty
# Line 115  Line 115 
115        | ArcSin        | ArcSin
116        | Tan        | Tan
117        | ArcTan        | ArcTan
118        | exp        | Exp
119        | Ceiling of int        | Ceiling of int
120        | Floor of int        | Floor of int
121        | Round of int        | Round of int
# Line 162  Line 162 
162        | resultArity (VSum _) = 1        | resultArity (VSum _) = 1
163        | resultArity (VClamp _) = 1        | resultArity (VClamp _) = 1
164        | resultArity (VLerp _) = 1        | resultArity (VLerp _) = 1
165        | resultArity (baseAddr _) = 1        | resultArity (BaseAddr _) = 1
166        | resultArity (TensorIndex _) = 1        | resultArity (TensorIndex _) = 1
167        | resultArity (LT _) = 1        | resultArity (LT _) = 1
168        | resultArity (LTE _) = 1        | resultArity (LTE _) = 1
# Line 196  Line 196 
196        | resultArity ArcSin = 1        | resultArity ArcSin = 1
197        | resultArity Tan = 1        | resultArity Tan = 1
198        | resultArity ArcTan = 1        | resultArity ArcTan = 1
199        | resultArity exp = 1        | resultArity Exp = 1
200        | resultArity (Ceiling _) = 1        | resultArity (Ceiling _) = 1
201        | resultArity (Floor _) = 1        | resultArity (Floor _) = 1
202        | resultArity (Round _) = 1        | resultArity (Round _) = 1
# Line 243  Line 243 
243        | arity (VSum _) = 1        | arity (VSum _) = 1
244        | arity (VClamp _) = 2        | arity (VClamp _) = 2
245        | arity (VLerp _) = 2        | arity (VLerp _) = 2
246        | arity (baseAddr _) = 1        | arity (BaseAddr _) = 1
247        | arity (TensorIndex _) = 1        | arity (TensorIndex _) = 1
248        | arity (LT _) = 2        | arity (LT _) = 2
249        | arity (LTE _) = 2        | arity (LTE _) = 2
# Line 277  Line 277 
277        | arity ArcSin = 1        | arity ArcSin = 1
278        | arity Tan = 1        | arity Tan = 1
279        | arity ArcTan = 1        | arity ArcTan = 1
280        | arity exp = 1        | arity Exp = 1
281        | arity (Ceiling _) = 1        | arity (Ceiling _) = 1
282        | arity (Floor _) = 1        | arity (Floor _) = 1
283        | arity (Round _) = 1        | arity (Round _) = 1
# Line 331  Line 331 
331        | same (VSum(a0,a1), VSum(b0,b1)) = sameshape(a0, b0) andalso sameint(a1, b1)        | same (VSum(a0,a1), VSum(b0,b1)) = sameshape(a0, b0) andalso sameint(a1, b1)
332        | same (VClamp(a0), VClamp(b0)) = sameint(a0, b0)        | same (VClamp(a0), VClamp(b0)) = sameint(a0, b0)
333        | same (VLerp(a0), VLerp(b0)) = sameint(a0, b0)        | same (VLerp(a0), VLerp(b0)) = sameint(a0, b0)
334        | same (baseAddr(a0), baseAddr(b0)) = ImageInfo.same(a0, b0)        | same (BaseAddr(a0), BaseAddr(b0)) = ImageInfo.same(a0, b0)
335        | same (TensorIndex(a0,a1,a2), TensorIndex(b0,b1,b2)) = samebool(a0, b0) andalso sameshape(a1, b1) andalso samety(a2, b2)        | same (TensorIndex(a0,a1,a2), TensorIndex(b0,b1,b2)) = samebool(a0, b0) andalso sameshape(a1, b1) andalso samety(a2, b2)
336        | same (LT(a0), LT(b0)) = samety(a0, b0)        | same (LT(a0), LT(b0)) = samety(a0, b0)
337        | same (LTE(a0), LTE(b0)) = samety(a0, b0)        | same (LTE(a0), LTE(b0)) = samety(a0, b0)
# Line 365  Line 365 
365        | same (ArcSin, ArcSin) = true        | same (ArcSin, ArcSin) = true
366        | same (Tan, Tan) = true        | same (Tan, Tan) = true
367        | same (ArcTan, ArcTan) = true        | same (ArcTan, ArcTan) = true
368        | same (exp, exp) = true        | same (Exp, Exp) = true
369        | same (Ceiling(a0), Ceiling(b0)) = sameint(a0, b0)        | same (Ceiling(a0), Ceiling(b0)) = sameint(a0, b0)
370        | same (Floor(a0), Floor(b0)) = sameint(a0, b0)        | same (Floor(a0), Floor(b0)) = sameint(a0, b0)
371        | same (Round(a0), Round(b0)) = sameint(a0, b0)        | same (Round(a0), Round(b0)) = sameint(a0, b0)
# Line 413  Line 413 
413        | hash (VSum(a0,a1)) = 0w73 + hashshape a0 + hashint a1        | hash (VSum(a0,a1)) = 0w73 + hashshape a0 + hashint a1
414        | hash (VClamp(a0)) = 0w79 + hashint a0        | hash (VClamp(a0)) = 0w79 + hashint a0
415        | hash (VLerp(a0)) = 0w83 + hashint a0        | hash (VLerp(a0)) = 0w83 + hashint a0
416        | hash (baseAddr(a0)) = 0w89 + ImageInfo.hash a0        | hash (BaseAddr(a0)) = 0w89 + ImageInfo.hash a0
417        | hash (TensorIndex(a0,a1,a2)) = 0w97 + hashbool a0 + hashshape a1 + hashty a2        | hash (TensorIndex(a0,a1,a2)) = 0w97 + hashbool a0 + hashshape a1 + hashty a2
418        | hash (LT(a0)) = 0w101 + hashty a0        | hash (LT(a0)) = 0w101 + hashty a0
419        | hash (LTE(a0)) = 0w103 + hashty a0        | hash (LTE(a0)) = 0w103 + hashty a0
# Line 447  Line 447 
447        | hash ArcSin = 0w257        | hash ArcSin = 0w257
448        | hash Tan = 0w263        | hash Tan = 0w263
449        | hash ArcTan = 0w269        | hash ArcTan = 0w269
450        | hash exp = 0w271        | hash Exp = 0w271
451        | hash (Ceiling(a0)) = 0w277 + hashint a0        | hash (Ceiling(a0)) = 0w277 + hashint a0
452        | hash (Floor(a0)) = 0w281 + hashint a0        | hash (Floor(a0)) = 0w281 + hashint a0
453        | hash (Round(a0)) = 0w283 + hashint a0        | hash (Round(a0)) = 0w283 + hashint a0
# Line 494  Line 494 
494        | toString (VSum(a0,a1)) = concat["VSum<", shapeToString a0, ",", intToString a1, ">"]        | toString (VSum(a0,a1)) = concat["VSum<", shapeToString a0, ",", intToString a1, ">"]
495        | toString (VClamp(a0)) = concat["VClamp<", intToString a0, ">"]        | toString (VClamp(a0)) = concat["VClamp<", intToString a0, ">"]
496        | toString (VLerp(a0)) = concat["VLerp<", intToString a0, ">"]        | toString (VLerp(a0)) = concat["VLerp<", intToString a0, ">"]
497        | toString (baseAddr(a0)) = concat["baseAddr<", ImageInfo.toString a0, ">"]        | toString (BaseAddr(a0)) = concat["BaseAddr<", ImageInfo.toString a0, ">"]
498        | toString (TensorIndex(a0,a1,a2)) = concat["TensorIndex<", boolToString a0, ",", shapeToString a1, ",", tyToString a2, ">"]        | toString (TensorIndex(a0,a1,a2)) = concat["TensorIndex<", boolToString a0, ",", shapeToString a1, ",", tyToString a2, ">"]
499        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]
500        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]
# Line 528  Line 528 
528        | toString ArcSin = "ArcSin"        | toString ArcSin = "ArcSin"
529        | toString Tan = "Tan"        | toString Tan = "Tan"
530        | toString ArcTan = "ArcTan"        | toString ArcTan = "ArcTan"
531        | toString exp = "exp"        | toString Exp = "Exp"
532        | toString (Ceiling(a0)) = concat["Ceiling<", intToString a0, ">"]        | toString (Ceiling(a0)) = concat["Ceiling<", intToString a0, ">"]
533        | toString (Floor(a0)) = concat["Floor<", intToString a0, ">"]        | toString (Floor(a0)) = concat["Floor<", intToString a0, ">"]
534        | toString (Round(a0)) = concat["Round<", intToString a0, ">"]        | toString (Round(a0)) = concat["Round<", intToString a0, ">"]

Legend:
Removed from v.3756  
changed lines
  Added in v.3757

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