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

SCM Repository

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

Diff of /branches/vis15/src/compiler/high-ir/high-ir.sml

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

revision 3507, Fri Dec 18 12:49:08 2015 UTC revision 3508, Fri Dec 18 14:19:30 2015 UTC
# Line 69  Line 69 
69        | Eigen2x2        | Eigen2x2
70        | Eigen3x3        | Eigen3x3
71        | Zero of ty        | Zero of ty
72        | Slice of ty * mask        | TensorSlice of ty * mask
73        | TensorSub of ty        | TensorIndex of ty
74        | Select of ty * int        | Select of ty * int
75        | SeqSub of ty        | Subscript of ty
76        | MkDynamic of ty * int        | MkDynamic of ty * int
77        | Append of ty        | Append of ty
78        | Prepend of ty        | Prepend of ty
79        | Concat of ty        | Concat of ty
80        | SphereQuery of ty * ty        | Range
81        | Length of ty        | Length of ty
82          | SphereQuery of ty * ty
83        | IntToReal        | IntToReal
84        | TruncToInt        | TruncToInt
85        | RoundToInt        | RoundToInt
# Line 127  Line 128 
128        | resultArity Eigen2x2 = 1        | resultArity Eigen2x2 = 1
129        | resultArity Eigen3x3 = 1        | resultArity Eigen3x3 = 1
130        | resultArity (Zero _) = 1        | resultArity (Zero _) = 1
131        | resultArity (Slice _) = 1        | resultArity (TensorSlice _) = 1
132        | resultArity (TensorSub _) = 1        | resultArity (TensorIndex _) = 1
133        | resultArity (Select _) = 1        | resultArity (Select _) = 1
134        | resultArity (SeqSub _) = 1        | resultArity (Subscript _) = 1
135        | resultArity (MkDynamic _) = 1        | resultArity (MkDynamic _) = 1
136        | resultArity (Append _) = 2        | resultArity (Append _) = 2
137        | resultArity (Prepend _) = 2        | resultArity (Prepend _) = 2
138        | resultArity (Concat _) = 2        | resultArity (Concat _) = 2
139        | resultArity (SphereQuery _) = 1        | resultArity Range = 2
140        | resultArity (Length _) = 1        | resultArity (Length _) = 1
141          | resultArity (SphereQuery _) = 1
142        | resultArity IntToReal = 1        | resultArity IntToReal = 1
143        | resultArity TruncToInt = 1        | resultArity TruncToInt = 1
144        | resultArity RoundToInt = 1        | resultArity RoundToInt = 1
# Line 185  Line 187 
187        | arity Eigen2x2 = 1        | arity Eigen2x2 = 1
188        | arity Eigen3x3 = 1        | arity Eigen3x3 = 1
189        | arity (Zero _) = 0        | arity (Zero _) = 0
190        | arity (Slice _) = 1        | arity (TensorSlice _) = 1
191        | arity (TensorSub _) = ~1        | arity (TensorIndex _) = ~1
192        | arity (Select _) = 1        | arity (Select _) = 1
193        | arity (SeqSub _) = 2        | arity (Subscript _) = 2
194        | arity (MkDynamic _) = 1        | arity (MkDynamic _) = 1
195        | arity (Append _) = 1        | arity (Append _) = 1
196        | arity (Prepend _) = 1        | arity (Prepend _) = 1
197        | arity (Concat _) = 1        | arity (Concat _) = 1
198        | arity (SphereQuery _) = 2        | arity Range = 1
199        | arity (Length _) = 1        | arity (Length _) = 1
200          | arity (SphereQuery _) = 2
201        | arity IntToReal = 1        | arity IntToReal = 1
202        | arity TruncToInt = 1        | arity TruncToInt = 1
203        | arity RoundToInt = 1        | arity RoundToInt = 1
# Line 250  Line 253 
253        | same (Eigen2x2, Eigen2x2) = true        | same (Eigen2x2, Eigen2x2) = true
254        | same (Eigen3x3, Eigen3x3) = true        | same (Eigen3x3, Eigen3x3) = true
255        | same (Zero(a0), Zero(b0)) = samety(a0, b0)        | same (Zero(a0), Zero(b0)) = samety(a0, b0)
256        | same (Slice(a0,a1), Slice(b0,b1)) = samety(a0, b0) andalso samemask(a1, b1)        | same (TensorSlice(a0,a1), TensorSlice(b0,b1)) = samety(a0, b0) andalso samemask(a1, b1)
257        | same (TensorSub(a0), TensorSub(b0)) = samety(a0, b0)        | same (TensorIndex(a0), TensorIndex(b0)) = samety(a0, b0)
258        | 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)
259        | same (SeqSub(a0), SeqSub(b0)) = samety(a0, b0)        | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)
260        | same (MkDynamic(a0,a1), MkDynamic(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)        | same (MkDynamic(a0,a1), MkDynamic(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
261        | same (Append(a0), Append(b0)) = samety(a0, b0)        | same (Append(a0), Append(b0)) = samety(a0, b0)
262        | same (Prepend(a0), Prepend(b0)) = samety(a0, b0)        | same (Prepend(a0), Prepend(b0)) = samety(a0, b0)
263        | same (Concat(a0), Concat(b0)) = samety(a0, b0)        | same (Concat(a0), Concat(b0)) = samety(a0, b0)
264        | same (SphereQuery(a0,a1), SphereQuery(b0,b1)) = samety(a0, b0) andalso samety(a1, b1)        | same (Range, Range) = true
265        | same (Length(a0), Length(b0)) = samety(a0, b0)        | same (Length(a0), Length(b0)) = samety(a0, b0)
266          | same (SphereQuery(a0,a1), SphereQuery(b0,b1)) = samety(a0, b0) andalso samety(a1, b1)
267        | same (IntToReal, IntToReal) = true        | same (IntToReal, IntToReal) = true
268        | same (TruncToInt, TruncToInt) = true        | same (TruncToInt, TruncToInt) = true
269        | same (RoundToInt, RoundToInt) = true        | same (RoundToInt, RoundToInt) = true
# Line 309  Line 313 
313        | hash Eigen2x2 = 0w83        | hash Eigen2x2 = 0w83
314        | hash Eigen3x3 = 0w89        | hash Eigen3x3 = 0w89
315        | hash (Zero(a0)) = 0w97 + hashty a0        | hash (Zero(a0)) = 0w97 + hashty a0
316        | hash (Slice(a0,a1)) = 0w101 + hashty a0 + hashmask a1        | hash (TensorSlice(a0,a1)) = 0w101 + hashty a0 + hashmask a1
317        | hash (TensorSub(a0)) = 0w103 + hashty a0        | hash (TensorIndex(a0)) = 0w103 + hashty a0
318        | hash (Select(a0,a1)) = 0w107 + hashty a0 + hashint a1        | hash (Select(a0,a1)) = 0w107 + hashty a0 + hashint a1
319        | hash (SeqSub(a0)) = 0w109 + hashty a0        | hash (Subscript(a0)) = 0w109 + hashty a0
320        | hash (MkDynamic(a0,a1)) = 0w113 + hashty a0 + hashint a1        | hash (MkDynamic(a0,a1)) = 0w113 + hashty a0 + hashint a1
321        | hash (Append(a0)) = 0w127 + hashty a0        | hash (Append(a0)) = 0w127 + hashty a0
322        | hash (Prepend(a0)) = 0w131 + hashty a0        | hash (Prepend(a0)) = 0w131 + hashty a0
323        | hash (Concat(a0)) = 0w137 + hashty a0        | hash (Concat(a0)) = 0w137 + hashty a0
324        | hash (SphereQuery(a0,a1)) = 0w139 + hashty a0 + hashty a1        | hash Range = 0w139
325        | hash (Length(a0)) = 0w149 + hashty a0        | hash (Length(a0)) = 0w149 + hashty a0
326        | hash IntToReal = 0w151        | hash (SphereQuery(a0,a1)) = 0w151 + hashty a0 + hashty a1
327        | hash TruncToInt = 0w157        | hash IntToReal = 0w157
328        | hash RoundToInt = 0w163        | hash TruncToInt = 0w163
329        | hash CeilToInt = 0w167        | hash RoundToInt = 0w167
330        | hash FloorToInt = 0w173        | hash CeilToInt = 0w173
331        | hash (R_All(a0)) = 0w179 + hashty a0        | hash FloorToInt = 0w179
332        | hash (R_Exists(a0)) = 0w181 + hashty a0        | hash (R_All(a0)) = 0w181 + hashty a0
333        | hash (R_Max(a0)) = 0w191 + hashty a0        | hash (R_Exists(a0)) = 0w191 + hashty a0
334        | hash (R_Min(a0)) = 0w193 + hashty a0        | hash (R_Max(a0)) = 0w193 + hashty a0
335        | hash (R_Sum(a0)) = 0w197 + hashty a0        | hash (R_Min(a0)) = 0w197 + hashty a0
336        | hash (R_Product(a0)) = 0w199 + hashty a0        | hash (R_Sum(a0)) = 0w199 + hashty a0
337        | hash (R_Mean(a0)) = 0w211 + hashty a0        | hash (R_Product(a0)) = 0w211 + hashty a0
338        | hash (R_Variance(a0)) = 0w223 + hashty a0        | hash (R_Mean(a0)) = 0w223 + hashty a0
339        | hash (Kernel(a0,a1)) = 0w227 + Kernel.hash a0 + hashint a1        | hash (R_Variance(a0)) = 0w227 + hashty a0
340        | hash (Inside(a0)) = 0w229 + hashint a0        | hash (Kernel(a0,a1)) = 0w229 + Kernel.hash a0 + hashint a1
341        | hash (ImageDim(a0,a1)) = 0w233 + ImageInfo.hash a0 + hashint a1        | hash (Inside(a0)) = 0w233 + hashint a0
342        | hash (BorderCtlDefault(a0)) = 0w239 + ImageInfo.hash a0        | hash (ImageDim(a0,a1)) = 0w239 + ImageInfo.hash a0 + hashint a1
343        | hash (BorderCtlClamp(a0)) = 0w241 + ImageInfo.hash a0        | hash (BorderCtlDefault(a0)) = 0w241 + ImageInfo.hash a0
344        | hash (BorderCtlMirror(a0)) = 0w251 + ImageInfo.hash a0        | hash (BorderCtlClamp(a0)) = 0w251 + ImageInfo.hash a0
345        | hash (BorderCtlWrap(a0)) = 0w257 + ImageInfo.hash a0        | hash (BorderCtlMirror(a0)) = 0w257 + ImageInfo.hash a0
346        | hash (LoadSeq(a0,a1)) = 0w263 + hashty a0 + hashstring a1        | hash (BorderCtlWrap(a0)) = 0w263 + ImageInfo.hash a0
347        | hash (LoadImage(a0,a1)) = 0w269 + hashty a0 + hashstring a1        | hash (LoadSeq(a0,a1)) = 0w269 + hashty a0 + hashstring a1
348        | hash (Print(a0)) = 0w271 + hashtys a0        | hash (LoadImage(a0,a1)) = 0w271 + hashty a0 + hashstring a1
349          | hash (Print(a0)) = 0w277 + hashtys a0
350    
351      fun toString IAdd = "IAdd"      fun toString IAdd = "IAdd"
352        | toString ISub = "ISub"        | toString ISub = "ISub"
# Line 367  Line 372 
372        | toString Eigen2x2 = "Eigen2x2"        | toString Eigen2x2 = "Eigen2x2"
373        | toString Eigen3x3 = "Eigen3x3"        | toString Eigen3x3 = "Eigen3x3"
374        | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"]        | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"]
375        | toString (Slice(a0,a1)) = concat["Slice<", tyToString a0, ",", maskToString a1, ">"]        | toString (TensorSlice(a0,a1)) = concat["TensorSlice<", tyToString a0, ",", maskToString a1, ">"]
376        | toString (TensorSub(a0)) = concat["TensorSub<", tyToString a0, ">"]        | toString (TensorIndex(a0)) = concat["TensorIndex<", tyToString a0, ">"]
377        | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]        | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]
378        | toString (SeqSub(a0)) = concat["SeqSub<", tyToString a0, ">"]        | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]
379        | toString (MkDynamic(a0,a1)) = concat["MkDynamic<", tyToString a0, ",", intToString a1, ">"]        | toString (MkDynamic(a0,a1)) = concat["MkDynamic<", tyToString a0, ",", intToString a1, ">"]
380        | toString (Append(a0)) = concat["Append<", tyToString a0, ">"]        | toString (Append(a0)) = concat["Append<", tyToString a0, ">"]
381        | toString (Prepend(a0)) = concat["Prepend<", tyToString a0, ">"]        | toString (Prepend(a0)) = concat["Prepend<", tyToString a0, ">"]
382        | toString (Concat(a0)) = concat["Concat<", tyToString a0, ">"]        | toString (Concat(a0)) = concat["Concat<", tyToString a0, ">"]
383        | toString (SphereQuery(a0,a1)) = concat["SphereQuery<", tyToString a0, ",", tyToString a1, ">"]        | toString Range = "Range"
384        | toString (Length(a0)) = concat["Length<", tyToString a0, ">"]        | toString (Length(a0)) = concat["Length<", tyToString a0, ">"]
385          | toString (SphereQuery(a0,a1)) = concat["SphereQuery<", tyToString a0, ",", tyToString a1, ">"]
386        | toString IntToReal = "IntToReal"        | toString IntToReal = "IntToReal"
387        | toString TruncToInt = "TruncToInt"        | toString TruncToInt = "TruncToInt"
388        | toString RoundToInt = "RoundToInt"        | toString RoundToInt = "RoundToInt"
# Line 404  Line 410 
410    end    end
411    
412  structure HighIR = SSAFn(  structure HighIR = SSAFn(
413    val ilName = "high-ir"    val irName = "high-ir"
414    structure Ty = HighTypes    structure Ty = HighTypes
415    structure Op = HighOps)    structure Op = HighOps)
416    

Legend:
Removed from v.3507  
changed lines
  Added in v.3508

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