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

SCM Repository

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

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

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

revision 3829, Thu May 5 21:05:37 2016 UTC revision 3830, Thu May 5 22:13:46 2016 UTC
# Line 69  Line 69 
69        | Abs of ty        | Abs of ty
70        | Max of ty        | Max of ty
71        | Min of ty        | Min of ty
72        | Clamp of ty        | RClamp
73        | Lerp of ty        | RLerp
74        | VAdd of int        | VAdd of int
75        | VSub of int        | VSub of int
76        | VScale of int        | VScale of int
# Line 78  Line 78 
78        | VNeg of int        | VNeg of int
79        | VSum of int        | VSum of int
80        | VProj of int * int        | VProj of int * int
81          | VClamp of int
82          | VMapClamp of int
83          | VLerp of int
84        | TensorIndex of ty * shape        | TensorIndex of ty * shape
85        | ProjectLast of ty * shape        | ProjectLast of ty * shape
86        | EigenVecs2x2        | EigenVecs2x2
# Line 147  Line 150 
150        | resultArity (Abs _) = 1        | resultArity (Abs _) = 1
151        | resultArity (Max _) = 1        | resultArity (Max _) = 1
152        | resultArity (Min _) = 1        | resultArity (Min _) = 1
153        | resultArity (Clamp _) = 1        | resultArity RClamp = 1
154        | resultArity (Lerp _) = 1        | resultArity RLerp = 1
155        | resultArity (VAdd _) = 1        | resultArity (VAdd _) = 1
156        | resultArity (VSub _) = 1        | resultArity (VSub _) = 1
157        | resultArity (VScale _) = 1        | resultArity (VScale _) = 1
# Line 156  Line 159 
159        | resultArity (VNeg _) = 1        | resultArity (VNeg _) = 1
160        | resultArity (VSum _) = 1        | resultArity (VSum _) = 1
161        | resultArity (VProj _) = 1        | resultArity (VProj _) = 1
162          | resultArity (VClamp _) = 1
163          | resultArity (VMapClamp _) = 1
164          | resultArity (VLerp _) = 1
165        | resultArity (TensorIndex _) = 1        | resultArity (TensorIndex _) = 1
166        | resultArity (ProjectLast _) = 1        | resultArity (ProjectLast _) = 1
167        | resultArity EigenVecs2x2 = 1        | resultArity EigenVecs2x2 = 1
# Line 225  Line 231 
231        | arity (Abs _) = 1        | arity (Abs _) = 1
232        | arity (Max _) = 2        | arity (Max _) = 2
233        | arity (Min _) = 2        | arity (Min _) = 2
234        | arity (Clamp _) = 3        | arity RClamp = 3
235        | arity (Lerp _) = 3        | arity RLerp = 3
236        | arity (VAdd _) = 2        | arity (VAdd _) = 2
237        | arity (VSub _) = 2        | arity (VSub _) = 2
238        | arity (VScale _) = 2        | arity (VScale _) = 2
# Line 234  Line 240 
240        | arity (VNeg _) = 2        | arity (VNeg _) = 2
241        | arity (VSum _) = 1        | arity (VSum _) = 1
242        | arity (VProj _) = 1        | arity (VProj _) = 1
243          | arity (VClamp _) = 3
244          | arity (VMapClamp _) = 3
245          | arity (VLerp _) = 3
246        | arity (TensorIndex _) = 1        | arity (TensorIndex _) = 1
247        | arity (ProjectLast _) = 1        | arity (ProjectLast _) = 1
248        | arity EigenVecs2x2 = 1        | arity EigenVecs2x2 = 1
# Line 310  Line 319 
319        | same (Abs(a0), Abs(b0)) = samety(a0, b0)        | same (Abs(a0), Abs(b0)) = samety(a0, b0)
320        | same (Max(a0), Max(b0)) = samety(a0, b0)        | same (Max(a0), Max(b0)) = samety(a0, b0)
321        | same (Min(a0), Min(b0)) = samety(a0, b0)        | same (Min(a0), Min(b0)) = samety(a0, b0)
322        | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)        | same (RClamp, RClamp) = true
323        | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)        | same (RLerp, RLerp) = true
324        | same (VAdd(a0), VAdd(b0)) = sameint(a0, b0)        | same (VAdd(a0), VAdd(b0)) = sameint(a0, b0)
325        | same (VSub(a0), VSub(b0)) = sameint(a0, b0)        | same (VSub(a0), VSub(b0)) = sameint(a0, b0)
326        | same (VScale(a0), VScale(b0)) = sameint(a0, b0)        | same (VScale(a0), VScale(b0)) = sameint(a0, b0)
# Line 319  Line 328 
328        | same (VNeg(a0), VNeg(b0)) = sameint(a0, b0)        | same (VNeg(a0), VNeg(b0)) = sameint(a0, b0)
329        | same (VSum(a0), VSum(b0)) = sameint(a0, b0)        | same (VSum(a0), VSum(b0)) = sameint(a0, b0)
330        | same (VProj(a0,a1), VProj(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)        | same (VProj(a0,a1), VProj(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)
331          | same (VClamp(a0), VClamp(b0)) = sameint(a0, b0)
332          | same (VMapClamp(a0), VMapClamp(b0)) = sameint(a0, b0)
333          | same (VLerp(a0), VLerp(b0)) = sameint(a0, b0)
334        | same (TensorIndex(a0,a1), TensorIndex(b0,b1)) = samety(a0, b0) andalso sameshape(a1, b1)        | same (TensorIndex(a0,a1), TensorIndex(b0,b1)) = samety(a0, b0) andalso sameshape(a1, b1)
335        | same (ProjectLast(a0,a1), ProjectLast(b0,b1)) = samety(a0, b0) andalso sameshape(a1, b1)        | same (ProjectLast(a0,a1), ProjectLast(b0,b1)) = samety(a0, b0) andalso sameshape(a1, b1)
336        | same (EigenVecs2x2, EigenVecs2x2) = true        | same (EigenVecs2x2, EigenVecs2x2) = true
# Line 389  Line 401 
401        | hash (Abs(a0)) = 0w71 + hashty a0        | hash (Abs(a0)) = 0w71 + hashty a0
402        | hash (Max(a0)) = 0w73 + hashty a0        | hash (Max(a0)) = 0w73 + hashty a0
403        | hash (Min(a0)) = 0w79 + hashty a0        | hash (Min(a0)) = 0w79 + hashty a0
404        | hash (Clamp(a0)) = 0w83 + hashty a0        | hash RClamp = 0w83
405        | hash (Lerp(a0)) = 0w89 + hashty a0        | hash RLerp = 0w89
406        | hash (VAdd(a0)) = 0w97 + hashint a0        | hash (VAdd(a0)) = 0w97 + hashint a0
407        | hash (VSub(a0)) = 0w101 + hashint a0        | hash (VSub(a0)) = 0w101 + hashint a0
408        | hash (VScale(a0)) = 0w103 + hashint a0        | hash (VScale(a0)) = 0w103 + hashint a0
# Line 398  Line 410 
410        | hash (VNeg(a0)) = 0w109 + hashint a0        | hash (VNeg(a0)) = 0w109 + hashint a0
411        | hash (VSum(a0)) = 0w113 + hashint a0        | hash (VSum(a0)) = 0w113 + hashint a0
412        | hash (VProj(a0,a1)) = 0w127 + hashint a0 + hashint a1        | hash (VProj(a0,a1)) = 0w127 + hashint a0 + hashint a1
413        | hash (TensorIndex(a0,a1)) = 0w131 + hashty a0 + hashshape a1        | hash (VClamp(a0)) = 0w131 + hashint a0
414        | hash (ProjectLast(a0,a1)) = 0w137 + hashty a0 + hashshape a1        | hash (VMapClamp(a0)) = 0w137 + hashint a0
415        | hash EigenVecs2x2 = 0w139        | hash (VLerp(a0)) = 0w139 + hashint a0
416        | hash EigenVecs3x3 = 0w149        | hash (TensorIndex(a0,a1)) = 0w149 + hashty a0 + hashshape a1
417        | hash EigenVals2x2 = 0w151        | hash (ProjectLast(a0,a1)) = 0w151 + hashty a0 + hashshape a1
418        | hash EigenVals3x3 = 0w157        | hash EigenVecs2x2 = 0w157
419        | hash (Zero(a0)) = 0w163 + hashty a0        | hash EigenVecs3x3 = 0w163
420        | hash (Select(a0,a1)) = 0w167 + hashty a0 + hashint a1        | hash EigenVals2x2 = 0w167
421        | hash (Subscript(a0)) = 0w173 + hashty a0        | hash EigenVals3x3 = 0w173
422        | hash (MkDynamic(a0,a1)) = 0w179 + hashty a0 + hashint a1        | hash (Zero(a0)) = 0w179 + hashty a0
423        | hash (Append(a0)) = 0w181 + hashty a0        | hash (Select(a0,a1)) = 0w181 + hashty a0 + hashint a1
424        | hash (Prepend(a0)) = 0w191 + hashty a0        | hash (Subscript(a0)) = 0w191 + hashty a0
425        | hash (Concat(a0)) = 0w193 + hashty a0        | hash (MkDynamic(a0,a1)) = 0w193 + hashty a0 + hashint a1
426        | hash Range = 0w197        | hash (Append(a0)) = 0w197 + hashty a0
427        | hash (Length(a0)) = 0w199 + hashty a0        | hash (Prepend(a0)) = 0w199 + hashty a0
428        | hash (SphereQuery(a0,a1)) = 0w211 + hashty a0 + hashty a1        | hash (Concat(a0)) = 0w211 + hashty a0
429        | hash Sqrt = 0w223        | hash Range = 0w223
430        | hash Cos = 0w227        | hash (Length(a0)) = 0w227 + hashty a0
431        | hash ArcCos = 0w229        | hash (SphereQuery(a0,a1)) = 0w229 + hashty a0 + hashty a1
432        | hash Sin = 0w233        | hash Sqrt = 0w233
433        | hash ArcSin = 0w239        | hash Cos = 0w239
434        | hash Tan = 0w241        | hash ArcCos = 0w241
435        | hash ArcTan = 0w251        | hash Sin = 0w251
436        | hash (Ceiling(a0)) = 0w257 + hashint a0        | hash ArcSin = 0w257
437        | hash (Floor(a0)) = 0w263 + hashint a0        | hash Tan = 0w263
438        | hash (Round(a0)) = 0w269 + hashint a0        | hash ArcTan = 0w269
439        | hash (Trunc(a0)) = 0w271 + hashint a0        | hash (Ceiling(a0)) = 0w271 + hashint a0
440        | hash IntToReal = 0w277        | hash (Floor(a0)) = 0w277 + hashint a0
441        | hash (RealToInt(a0)) = 0w281 + hashint a0        | hash (Round(a0)) = 0w281 + hashint a0
442        | hash (R_All(a0)) = 0w283 + hashty a0        | hash (Trunc(a0)) = 0w283 + hashint a0
443        | hash (R_Exists(a0)) = 0w293 + hashty a0        | hash IntToReal = 0w293
444        | hash (R_Max(a0)) = 0w307 + hashty a0        | hash (RealToInt(a0)) = 0w307 + hashint a0
445        | hash (R_Min(a0)) = 0w311 + hashty a0        | hash (R_All(a0)) = 0w311 + hashty a0
446        | hash (R_Sum(a0)) = 0w313 + hashty a0        | hash (R_Exists(a0)) = 0w313 + hashty a0
447        | hash (R_Product(a0)) = 0w317 + hashty a0        | hash (R_Max(a0)) = 0w317 + hashty a0
448        | hash (R_Mean(a0)) = 0w331 + hashty a0        | hash (R_Min(a0)) = 0w331 + hashty a0
449        | hash (R_Variance(a0)) = 0w337 + hashty a0        | hash (R_Sum(a0)) = 0w337 + hashty a0
450        | hash (Transform(a0)) = 0w347 + ImageInfo.hash a0        | hash (R_Product(a0)) = 0w347 + hashty a0
451        | hash (Translate(a0)) = 0w349 + ImageInfo.hash a0        | hash (R_Mean(a0)) = 0w349 + hashty a0
452        | hash (ControlIndex(a0,a1,a2)) = 0w353 + ImageInfo.hash a0 + hashidxctl a1 + hashint a2        | hash (R_Variance(a0)) = 0w353 + hashty a0
453        | hash (LoadVoxel(a0)) = 0w359 + ImageInfo.hash a0        | hash (Transform(a0)) = 0w359 + ImageInfo.hash a0
454        | hash (Inside(a0,a1)) = 0w367 + ImageInfo.hash a0 + hashint a1        | hash (Translate(a0)) = 0w367 + ImageInfo.hash a0
455        | hash (ImageDim(a0,a1)) = 0w373 + ImageInfo.hash a0 + hashint a1        | hash (ControlIndex(a0,a1,a2)) = 0w373 + ImageInfo.hash a0 + hashidxctl a1 + hashint a2
456        | hash (LoadSeq(a0,a1)) = 0w379 + hashty a0 + hashstring a1        | hash (LoadVoxel(a0)) = 0w379 + ImageInfo.hash a0
457        | hash (LoadImage(a0,a1)) = 0w383 + hashty a0 + hashstring a1        | hash (Inside(a0,a1)) = 0w383 + ImageInfo.hash a0 + hashint a1
458        | hash (Print(a0)) = 0w389 + hashtys a0        | hash (ImageDim(a0,a1)) = 0w389 + ImageInfo.hash a0 + hashint a1
459        | hash (MathFn(a0)) = 0w397 + MathFns.hash a0        | hash (LoadSeq(a0,a1)) = 0w397 + hashty a0 + hashstring a1
460          | hash (LoadImage(a0,a1)) = 0w401 + hashty a0 + hashstring a1
461          | hash (Print(a0)) = 0w409 + hashtys a0
462          | hash (MathFn(a0)) = 0w419 + MathFns.hash a0
463    
464      fun toString IAdd = "IAdd"      fun toString IAdd = "IAdd"
465        | toString ISub = "ISub"        | toString ISub = "ISub"
# Line 467  Line 482 
482        | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"]        | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"]
483        | toString (Max(a0)) = concat["Max<", tyToString a0, ">"]        | toString (Max(a0)) = concat["Max<", tyToString a0, ">"]
484        | toString (Min(a0)) = concat["Min<", tyToString a0, ">"]        | toString (Min(a0)) = concat["Min<", tyToString a0, ">"]
485        | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]        | toString RClamp = "RClamp"
486        | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]        | toString RLerp = "RLerp"
487        | toString (VAdd(a0)) = concat["VAdd<", intToString a0, ">"]        | toString (VAdd(a0)) = concat["VAdd<", intToString a0, ">"]
488        | toString (VSub(a0)) = concat["VSub<", intToString a0, ">"]        | toString (VSub(a0)) = concat["VSub<", intToString a0, ">"]
489        | toString (VScale(a0)) = concat["VScale<", intToString a0, ">"]        | toString (VScale(a0)) = concat["VScale<", intToString a0, ">"]
# Line 476  Line 491 
491        | toString (VNeg(a0)) = concat["VNeg<", intToString a0, ">"]        | toString (VNeg(a0)) = concat["VNeg<", intToString a0, ">"]
492        | toString (VSum(a0)) = concat["VSum<", intToString a0, ">"]        | toString (VSum(a0)) = concat["VSum<", intToString a0, ">"]
493        | toString (VProj(a0,a1)) = concat["VProj<", intToString a0, ",", intToString a1, ">"]        | toString (VProj(a0,a1)) = concat["VProj<", intToString a0, ",", intToString a1, ">"]
494          | toString (VClamp(a0)) = concat["VClamp<", intToString a0, ">"]
495          | toString (VMapClamp(a0)) = concat["VMapClamp<", intToString a0, ">"]
496          | toString (VLerp(a0)) = concat["VLerp<", intToString a0, ">"]
497        | toString (TensorIndex(a0,a1)) = concat["TensorIndex<", tyToString a0, ",", shapeToString a1, ">"]        | toString (TensorIndex(a0,a1)) = concat["TensorIndex<", tyToString a0, ",", shapeToString a1, ">"]
498        | toString (ProjectLast(a0,a1)) = concat["ProjectLast<", tyToString a0, ",", shapeToString a1, ">"]        | toString (ProjectLast(a0,a1)) = concat["ProjectLast<", tyToString a0, ",", shapeToString a1, ">"]
499        | toString EigenVecs2x2 = "EigenVecs2x2"        | toString EigenVecs2x2 = "EigenVecs2x2"

Legend:
Removed from v.3829  
changed lines
  Added in v.3830

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