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 3650, Tue Feb 2 16:58:46 2016 UTC revision 3651, Tue Feb 2 16:59:08 2016 UTC
# Line 69  Line 69 
69        | VNeg of int        | VNeg of int
70        | VSum of int        | VSum of int
71        | VProj of int * int        | VProj of int * int
72          | TensorIndex of ty * intlist
73          | ProjectLast of ty * intlist
74        | LT of ty        | LT of ty
75        | LTE of ty        | LTE of ty
76        | EQ of ty        | EQ of ty
# Line 147  Line 149 
149        | resultArity (VNeg _) = 1        | resultArity (VNeg _) = 1
150        | resultArity (VSum _) = 1        | resultArity (VSum _) = 1
151        | resultArity (VProj _) = 1        | resultArity (VProj _) = 1
152          | resultArity (TensorIndex _) = 1
153          | resultArity (ProjectLast _) = 1
154        | resultArity (LT _) = 1        | resultArity (LT _) = 1
155        | resultArity (LTE _) = 1        | resultArity (LTE _) = 1
156        | resultArity (EQ _) = 1        | resultArity (EQ _) = 1
# Line 225  Line 229 
229        | arity (VNeg _) = 2        | arity (VNeg _) = 2
230        | arity (VSum _) = 1        | arity (VSum _) = 1
231        | arity (VProj _) = 1        | arity (VProj _) = 1
232          | arity (TensorIndex _) = 1
233          | arity (ProjectLast _) = 1
234        | arity (LT _) = 2        | arity (LT _) = 2
235        | arity (LTE _) = 2        | arity (LTE _) = 2
236        | arity (EQ _) = 2        | arity (EQ _) = 2
# Line 310  Line 316 
316        | same (VNeg(a0), VNeg(b0)) = sameint(a0, b0)        | same (VNeg(a0), VNeg(b0)) = sameint(a0, b0)
317        | same (VSum(a0), VSum(b0)) = sameint(a0, b0)        | same (VSum(a0), VSum(b0)) = sameint(a0, b0)
318        | 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)
319          | same (TensorIndex(a0,a1), TensorIndex(b0,b1)) = samety(a0, b0) andalso sameintlist(a1, b1)
320          | same (ProjectLast(a0,a1), ProjectLast(b0,b1)) = samety(a0, b0) andalso sameintlist(a1, b1)
321        | same (LT(a0), LT(b0)) = samety(a0, b0)        | same (LT(a0), LT(b0)) = samety(a0, b0)
322        | same (LTE(a0), LTE(b0)) = samety(a0, b0)        | same (LTE(a0), LTE(b0)) = samety(a0, b0)
323        | same (EQ(a0), EQ(b0)) = samety(a0, b0)        | same (EQ(a0), EQ(b0)) = samety(a0, b0)
# Line 389  Line 397 
397        | hash (VNeg(a0)) = 0w59 + hashint a0        | hash (VNeg(a0)) = 0w59 + hashint a0
398        | hash (VSum(a0)) = 0w61 + hashint a0        | hash (VSum(a0)) = 0w61 + hashint a0
399        | hash (VProj(a0,a1)) = 0w67 + hashint a0 + hashint a1        | hash (VProj(a0,a1)) = 0w67 + hashint a0 + hashint a1
400        | hash (LT(a0)) = 0w71 + hashty a0        | hash (TensorIndex(a0,a1)) = 0w71 + hashty a0 + hashintlist a1
401        | hash (LTE(a0)) = 0w73 + hashty a0        | hash (ProjectLast(a0,a1)) = 0w73 + hashty a0 + hashintlist a1
402        | hash (EQ(a0)) = 0w79 + hashty a0        | hash (LT(a0)) = 0w79 + hashty a0
403        | hash (NEQ(a0)) = 0w83 + hashty a0        | hash (LTE(a0)) = 0w83 + hashty a0
404        | hash (GT(a0)) = 0w89 + hashty a0        | hash (EQ(a0)) = 0w89 + hashty a0
405        | hash (GTE(a0)) = 0w97 + hashty a0        | hash (NEQ(a0)) = 0w97 + hashty a0
406        | hash Not = 0w101        | hash (GT(a0)) = 0w101 + hashty a0
407        | hash (Abs(a0)) = 0w103 + hashty a0        | hash (GTE(a0)) = 0w103 + hashty a0
408        | hash (Max(a0)) = 0w107 + hashty a0        | hash Not = 0w107
409        | hash (Min(a0)) = 0w109 + hashty a0        | hash (Abs(a0)) = 0w109 + hashty a0
410        | hash (Clamp(a0)) = 0w113 + hashty a0        | hash (Max(a0)) = 0w113 + hashty a0
411        | hash (Lerp(a0)) = 0w127 + hashty a0        | hash (Min(a0)) = 0w127 + hashty a0
412        | hash EigenVecs2x2 = 0w131        | hash (Clamp(a0)) = 0w131 + hashty a0
413        | hash EigenVecs3x3 = 0w137        | hash (Lerp(a0)) = 0w137 + hashty a0
414        | hash EigenVals2x2 = 0w139        | hash EigenVecs2x2 = 0w139
415        | hash EigenVals3x3 = 0w149        | hash EigenVecs3x3 = 0w149
416        | hash (Zero(a0)) = 0w151 + hashty a0        | hash EigenVals2x2 = 0w151
417        | hash (Select(a0,a1)) = 0w157 + hashty a0 + hashint a1        | hash EigenVals3x3 = 0w157
418        | hash (Index(a0,a1)) = 0w163 + hashty a0 + hashint a1        | hash (Zero(a0)) = 0w163 + hashty a0
419        | hash (Subscript(a0)) = 0w167 + hashty a0        | hash (Select(a0,a1)) = 0w167 + hashty a0 + hashint a1
420        | hash (MkDynamic(a0,a1)) = 0w173 + hashty a0 + hashint a1        | hash (Index(a0,a1)) = 0w173 + hashty a0 + hashint a1
421        | hash (Append(a0)) = 0w179 + hashty a0        | hash (Subscript(a0)) = 0w179 + hashty a0
422        | hash (Prepend(a0)) = 0w181 + hashty a0        | hash (MkDynamic(a0,a1)) = 0w181 + hashty a0 + hashint a1
423        | hash (Concat(a0)) = 0w191 + hashty a0        | hash (Append(a0)) = 0w191 + hashty a0
424        | hash Range = 0w193        | hash (Prepend(a0)) = 0w193 + hashty a0
425        | hash (Length(a0)) = 0w197 + hashty a0        | hash (Concat(a0)) = 0w197 + hashty a0
426        | hash (SphereQuery(a0,a1)) = 0w199 + hashty a0 + hashty a1        | hash Range = 0w199
427        | hash Sqrt = 0w211        | hash (Length(a0)) = 0w211 + hashty a0
428        | hash Cos = 0w223        | hash (SphereQuery(a0,a1)) = 0w223 + hashty a0 + hashty a1
429        | hash ArcCos = 0w227        | hash Sqrt = 0w227
430        | hash Sine = 0w229        | hash Cos = 0w229
431        | hash ArcSin = 0w233        | hash ArcCos = 0w233
432        | hash Tan = 0w239        | hash Sine = 0w239
433        | hash ArcTan = 0w241        | hash ArcSin = 0w241
434        | hash (Ceiling(a0)) = 0w251 + hashint a0        | hash Tan = 0w251
435        | hash (Floor(a0)) = 0w257 + hashint a0        | hash ArcTan = 0w257
436        | hash (Round(a0)) = 0w263 + hashint a0        | hash (Ceiling(a0)) = 0w263 + hashint a0
437        | hash (Trunc(a0)) = 0w269 + hashint a0        | hash (Floor(a0)) = 0w269 + hashint a0
438        | hash IntToReal = 0w271        | hash (Round(a0)) = 0w271 + hashint a0
439        | hash (RealToInt(a0)) = 0w277 + hashint a0        | hash (Trunc(a0)) = 0w277 + hashint a0
440        | hash (R_All(a0)) = 0w281 + hashty a0        | hash IntToReal = 0w281
441        | hash (R_Exists(a0)) = 0w283 + hashty a0        | hash (RealToInt(a0)) = 0w283 + hashint a0
442        | hash (R_Max(a0)) = 0w293 + hashty a0        | hash (R_All(a0)) = 0w293 + hashty a0
443        | hash (R_Min(a0)) = 0w307 + hashty a0        | hash (R_Exists(a0)) = 0w307 + hashty a0
444        | hash (R_Sum(a0)) = 0w311 + hashty a0        | hash (R_Max(a0)) = 0w311 + hashty a0
445        | hash (R_Product(a0)) = 0w313 + hashty a0        | hash (R_Min(a0)) = 0w313 + hashty a0
446        | hash (R_Mean(a0)) = 0w317 + hashty a0        | hash (R_Sum(a0)) = 0w317 + hashty a0
447        | hash (R_Variance(a0)) = 0w331 + hashty a0        | hash (R_Product(a0)) = 0w331 + hashty a0
448        | hash (Transform(a0)) = 0w337 + ImageInfo.hash a0        | hash (R_Mean(a0)) = 0w337 + hashty a0
449        | hash (Translate(a0)) = 0w347 + ImageInfo.hash a0        | hash (R_Variance(a0)) = 0w347 + hashty a0
450        | hash (ImageAddress(a0)) = 0w349 + ImageInfo.hash a0        | hash (Transform(a0)) = 0w349 + ImageInfo.hash a0
451        | hash (ControlIndex(a0,a1,a2)) = 0w353 + ImageInfo.hash a0 + hashidxctl a1 + hashint a2        | hash (Translate(a0)) = 0w353 + ImageInfo.hash a0
452        | hash (LoadVoxels(a0,a1)) = 0w359 + ImageInfo.hash a0 + hashint a1        | hash (ImageAddress(a0)) = 0w359 + ImageInfo.hash a0
453        | hash (Inside(a0,a1)) = 0w367 + ImageInfo.hash a0 + hashint a1        | hash (ControlIndex(a0,a1,a2)) = 0w367 + ImageInfo.hash a0 + hashidxctl a1 + hashint a2
454        | hash (ImageDim(a0,a1)) = 0w373 + ImageInfo.hash a0 + hashint a1        | hash (LoadVoxels(a0,a1)) = 0w373 + ImageInfo.hash a0 + hashint a1
455        | hash (LoadSeq(a0,a1)) = 0w379 + hashty a0 + hashstring a1        | hash (Inside(a0,a1)) = 0w379 + ImageInfo.hash a0 + hashint a1
456        | hash (LoadImage(a0,a1)) = 0w383 + hashty a0 + hashstring a1        | hash (ImageDim(a0,a1)) = 0w383 + ImageInfo.hash a0 + hashint a1
457        | hash (Print(a0)) = 0w389 + hashtys a0        | hash (LoadSeq(a0,a1)) = 0w389 + hashty a0 + hashstring a1
458        | hash (MathFn(a0)) = 0w397 + MathFns.hash a0        | hash (LoadImage(a0,a1)) = 0w397 + hashty a0 + hashstring a1
459          | hash (Print(a0)) = 0w401 + hashtys a0
460          | hash (MathFn(a0)) = 0w409 + MathFns.hash a0
461    
462      fun toString IAdd = "IAdd"      fun toString IAdd = "IAdd"
463        | toString ISub = "ISub"        | toString ISub = "ISub"
# Line 467  Line 477 
477        | toString (VNeg(a0)) = concat["VNeg<", intToString a0, ">"]        | toString (VNeg(a0)) = concat["VNeg<", intToString a0, ">"]
478        | toString (VSum(a0)) = concat["VSum<", intToString a0, ">"]        | toString (VSum(a0)) = concat["VSum<", intToString a0, ">"]
479        | toString (VProj(a0,a1)) = concat["VProj<", intToString a0, ",", intToString a1, ">"]        | toString (VProj(a0,a1)) = concat["VProj<", intToString a0, ",", intToString a1, ">"]
480          | toString (TensorIndex(a0,a1)) = concat["TensorIndex<", tyToString a0, ",", intlistToString a1, ">"]
481          | toString (ProjectLast(a0,a1)) = concat["ProjectLast<", tyToString a0, ",", intlistToString a1, ">"]
482        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]
483        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]
484        | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]        | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]

Legend:
Removed from v.3650  
changed lines
  Added in v.3651

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