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

SCM Repository

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

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

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

revision 3581, Wed Jan 13 03:18:52 2016 UTC revision 3582, Wed Jan 13 22:14:05 2016 UTC
# Line 69  Line 69 
69        | Min of ty        | Min of ty
70        | Clamp of ty        | Clamp of ty
71        | Lerp of ty        | Lerp of ty
       | Dist of ty  
72        | PrincipleEvec of ty        | PrincipleEvec of ty
73        | EigenVecs2x2        | EigenVecs2x2
74        | EigenVecs3x3        | EigenVecs3x3
# Line 112  Line 111 
111        | LoadSeq of ty * string        | LoadSeq of ty * string
112        | LoadImage of ty * string        | LoadImage of ty * string
113        | Print of tys        | Print of tys
114          | MathFn of MathFns.t
115    
116      fun resultArity IAdd = 1      fun resultArity IAdd = 1
117        | resultArity ISub = 1        | resultArity ISub = 1
# Line 131  Line 131 
131        | resultArity (Min _) = 1        | resultArity (Min _) = 1
132        | resultArity (Clamp _) = 1        | resultArity (Clamp _) = 1
133        | resultArity (Lerp _) = 1        | resultArity (Lerp _) = 1
       | resultArity (Dist _) = 1  
134        | resultArity (PrincipleEvec _) = 1        | resultArity (PrincipleEvec _) = 1
135        | resultArity EigenVecs2x2 = 1        | resultArity EigenVecs2x2 = 1
136        | resultArity EigenVecs3x3 = 1        | resultArity EigenVecs3x3 = 1
# Line 174  Line 173 
173        | resultArity (LoadSeq _) = 1        | resultArity (LoadSeq _) = 1
174        | resultArity (LoadImage _) = 1        | resultArity (LoadImage _) = 1
175        | resultArity (Print _) = 0        | resultArity (Print _) = 0
176          | resultArity (MathFn _) = 1
177    
178      fun arity IAdd = 2      fun arity IAdd = 2
179        | arity ISub = 2        | arity ISub = 2
# Line 193  Line 193 
193        | arity (Min _) = 2        | arity (Min _) = 2
194        | arity (Clamp _) = 3        | arity (Clamp _) = 3
195        | arity (Lerp _) = 3        | arity (Lerp _) = 3
       | arity (Dist _) = 2  
196        | arity (PrincipleEvec _) = 2        | arity (PrincipleEvec _) = 2
197        | arity EigenVecs2x2 = 1        | arity EigenVecs2x2 = 1
198        | arity EigenVecs3x3 = 1        | arity EigenVecs3x3 = 1
# Line 236  Line 235 
235        | arity (LoadSeq _) = 0        | arity (LoadSeq _) = 0
236        | arity (LoadImage _) = 0        | arity (LoadImage _) = 0
237        | arity (Print _) = ~1        | arity (Print _) = ~1
238          | arity (MathFn _) = ~1
239    
240      fun isPure (MkDynamic _) = false      fun isPure (MkDynamic _) = false
241        | isPure (Append _) = false        | isPure (Append _) = false
# Line 262  Line 262 
262        | same (Min(a0), Min(b0)) = samety(a0, b0)        | same (Min(a0), Min(b0)) = samety(a0, b0)
263        | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)        | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)
264        | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)        | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)
       | same (Dist(a0), Dist(b0)) = samety(a0, b0)  
265        | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)        | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)
266        | same (EigenVecs2x2, EigenVecs2x2) = true        | same (EigenVecs2x2, EigenVecs2x2) = true
267        | same (EigenVecs3x3, EigenVecs3x3) = true        | same (EigenVecs3x3, EigenVecs3x3) = true
# Line 305  Line 304 
304        | same (LoadSeq(a0,a1), LoadSeq(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)        | same (LoadSeq(a0,a1), LoadSeq(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)
305        | same (LoadImage(a0,a1), LoadImage(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)        | same (LoadImage(a0,a1), LoadImage(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)
306        | same (Print(a0), Print(b0)) = sametys(a0, b0)        | same (Print(a0), Print(b0)) = sametys(a0, b0)
307          | same (MathFn(a0), MathFn(b0)) = MathFns.same(a0, b0)
308        | same _ = false        | same _ = false
309    
310      fun hash IAdd = 0w3      fun hash IAdd = 0w3
# Line 325  Line 325 
325        | hash (Min(a0)) = 0w59 + hashty a0        | hash (Min(a0)) = 0w59 + hashty a0
326        | hash (Clamp(a0)) = 0w61 + hashty a0        | hash (Clamp(a0)) = 0w61 + hashty a0
327        | hash (Lerp(a0)) = 0w67 + hashty a0        | hash (Lerp(a0)) = 0w67 + hashty a0
328        | hash (Dist(a0)) = 0w71 + hashty a0        | hash (PrincipleEvec(a0)) = 0w71 + hashty a0
329        | hash (PrincipleEvec(a0)) = 0w73 + hashty a0        | hash EigenVecs2x2 = 0w73
330        | hash EigenVecs2x2 = 0w79        | hash EigenVecs3x3 = 0w79
331        | hash EigenVecs3x3 = 0w83        | hash EigenVals2x2 = 0w83
332        | hash EigenVals2x2 = 0w89        | hash EigenVals3x3 = 0w89
333        | hash EigenVals3x3 = 0w97        | hash (Zero(a0)) = 0w97 + hashty a0
334        | hash (Zero(a0)) = 0w101 + hashty a0        | hash (Select(a0,a1)) = 0w101 + hashty a0 + hashint a1
335        | hash (Select(a0,a1)) = 0w103 + hashty a0 + hashint a1        | hash (Index(a0,a1)) = 0w103 + hashty a0 + hashint a1
336        | hash (Index(a0,a1)) = 0w107 + hashty a0 + hashint a1        | hash (Subscript(a0)) = 0w107 + hashty a0
337        | hash (Subscript(a0)) = 0w109 + hashty a0        | hash (MkDynamic(a0,a1)) = 0w109 + hashty a0 + hashint a1
338        | hash (MkDynamic(a0,a1)) = 0w113 + hashty a0 + hashint a1        | hash (Append(a0)) = 0w113 + hashty a0
339        | hash (Append(a0)) = 0w127 + hashty a0        | hash (Prepend(a0)) = 0w127 + hashty a0
340        | hash (Prepend(a0)) = 0w131 + hashty a0        | hash (Concat(a0)) = 0w131 + hashty a0
341        | hash (Concat(a0)) = 0w137 + hashty a0        | hash Range = 0w137
342        | hash Range = 0w139        | hash (Length(a0)) = 0w139 + hashty a0
343        | hash (Length(a0)) = 0w149 + hashty a0        | hash (SphereQuery(a0,a1)) = 0w149 + hashty a0 + hashty a1
344        | hash (SphereQuery(a0,a1)) = 0w151 + hashty a0 + hashty a1        | hash (Ceiling(a0)) = 0w151 + hashint a0
345        | hash (Ceiling(a0)) = 0w157 + hashint a0        | hash (Floor(a0)) = 0w157 + hashint a0
346        | hash (Floor(a0)) = 0w163 + hashint a0        | hash (Round(a0)) = 0w163 + hashint a0
347        | hash (Round(a0)) = 0w167 + hashint a0        | hash (Trunc(a0)) = 0w167 + hashint a0
348        | hash (Trunc(a0)) = 0w173 + hashint a0        | hash IntToReal = 0w173
349        | hash IntToReal = 0w179        | hash (RealToInt(a0)) = 0w179 + hashint a0
350        | hash (RealToInt(a0)) = 0w181 + hashint a0        | hash (R_All(a0)) = 0w181 + hashty a0
351        | hash (R_All(a0)) = 0w191 + hashty a0        | hash (R_Exists(a0)) = 0w191 + hashty a0
352        | hash (R_Exists(a0)) = 0w193 + hashty a0        | hash (R_Max(a0)) = 0w193 + hashty a0
353        | hash (R_Max(a0)) = 0w197 + hashty a0        | hash (R_Min(a0)) = 0w197 + hashty a0
354        | hash (R_Min(a0)) = 0w199 + hashty a0        | hash (R_Sum(a0)) = 0w199 + hashty a0
355        | hash (R_Sum(a0)) = 0w211 + hashty a0        | hash (R_Product(a0)) = 0w211 + hashty a0
356        | hash (R_Product(a0)) = 0w223 + hashty a0        | hash (R_Mean(a0)) = 0w223 + hashty a0
357        | hash (R_Mean(a0)) = 0w227 + hashty a0        | hash (R_Variance(a0)) = 0w227 + hashty a0
358        | hash (R_Variance(a0)) = 0w229 + hashty a0        | hash (Kernel(a0,a1)) = 0w229 + Kernel.hash a0 + hashint a1
359        | hash (Kernel(a0,a1)) = 0w233 + Kernel.hash a0 + hashint a1        | hash (Transform(a0)) = 0w233 + ImageInfo.hash a0
360        | hash (Transform(a0)) = 0w239 + ImageInfo.hash a0        | hash (Translate(a0)) = 0w239 + ImageInfo.hash a0
361        | hash (Translate(a0)) = 0w241 + ImageInfo.hash a0        | hash (EvalKernel(a0,a1,a2)) = 0w241 + hashint a0 + Kernel.hash a1 + hashint a2
362        | hash (EvalKernel(a0,a1,a2)) = 0w251 + hashint a0 + Kernel.hash a1 + hashint a2        | hash (VoxelAddress(a0,a1)) = 0w251 + ImageInfo.hash a0 + hashint a1
363        | hash (VoxelAddress(a0,a1)) = 0w257 + ImageInfo.hash a0 + hashint a1        | hash (VoxelAddressWithCtl(a0,a1,a2)) = 0w257 + ImageInfo.hash a0 + hashint a1 + hashidxctl a2
364        | hash (VoxelAddressWithCtl(a0,a1,a2)) = 0w263 + ImageInfo.hash a0 + hashint a1 + hashidxctl a2        | hash (LoadVoxels(a0,a1)) = 0w263 + ImageInfo.hash a0 + hashint a1
365        | hash (LoadVoxels(a0,a1)) = 0w269 + ImageInfo.hash a0 + hashint a1        | hash (Inside(a0,a1)) = 0w269 + ImageInfo.hash a0 + hashint a1
366        | hash (Inside(a0,a1)) = 0w271 + ImageInfo.hash a0 + hashint a1        | hash (ImageDim(a0,a1)) = 0w271 + ImageInfo.hash a0 + hashint a1
367        | hash (ImageDim(a0,a1)) = 0w277 + ImageInfo.hash a0 + hashint a1        | hash (LoadSeq(a0,a1)) = 0w277 + hashty a0 + hashstring a1
368        | hash (LoadSeq(a0,a1)) = 0w281 + hashty a0 + hashstring a1        | hash (LoadImage(a0,a1)) = 0w281 + hashty a0 + hashstring a1
369        | hash (LoadImage(a0,a1)) = 0w283 + hashty a0 + hashstring a1        | hash (Print(a0)) = 0w283 + hashtys a0
370        | hash (Print(a0)) = 0w293 + hashtys a0        | hash (MathFn(a0)) = 0w293 + MathFns.hash a0
371    
372      fun toString IAdd = "IAdd"      fun toString IAdd = "IAdd"
373        | toString ISub = "ISub"        | toString ISub = "ISub"
# Line 387  Line 387 
387        | toString (Min(a0)) = concat["Min<", tyToString a0, ">"]        | toString (Min(a0)) = concat["Min<", tyToString a0, ">"]
388        | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]        | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]
389        | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]        | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]
       | toString (Dist(a0)) = concat["Dist<", tyToString a0, ">"]  
390        | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]        | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]
391        | toString EigenVecs2x2 = "EigenVecs2x2"        | toString EigenVecs2x2 = "EigenVecs2x2"
392        | toString EigenVecs3x3 = "EigenVecs3x3"        | toString EigenVecs3x3 = "EigenVecs3x3"
# Line 430  Line 429 
429        | toString (LoadSeq(a0,a1)) = concat["LoadSeq<", tyToString a0, ",", stringToString a1, ">"]        | toString (LoadSeq(a0,a1)) = concat["LoadSeq<", tyToString a0, ",", stringToString a1, ">"]
430        | toString (LoadImage(a0,a1)) = concat["LoadImage<", tyToString a0, ",", stringToString a1, ">"]        | toString (LoadImage(a0,a1)) = concat["LoadImage<", tyToString a0, ",", stringToString a1, ">"]
431        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]
432          | toString (MathFn(a0)) = concat["MathFn<", MathFns.toString a0, ">"]
433    
434    end    end
435    

Legend:
Removed from v.3581  
changed lines
  Added in v.3582

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