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

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/mid-il/mid-il.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/mid-il/mid-il.sml

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

revision 2011, Sun Oct 7 21:14:31 2012 UTC revision 2027, Thu Oct 11 10:40:12 2012 UTC
# Line 96  Line 96 
96        | TensorToWorldSpace of ImageInfo.info * ty        | TensorToWorldSpace of ImageInfo.info * ty
97        | EvalKernel of int * Kernel.kernel * int        | EvalKernel of int * Kernel.kernel * int
98        | Inside of ImageInfo.info * int        | Inside of ImageInfo.info * int
99          | LoadSeq of ty * string
100          | LoadImage of ty * string * ImageInfo.info
101        | Input of input        | Input of input
102        | Print of tys        | Print of tys
103    
# Line 155  Line 157 
157        | resultArity (TensorToWorldSpace _) = 1        | resultArity (TensorToWorldSpace _) = 1
158        | resultArity (EvalKernel _) = 1        | resultArity (EvalKernel _) = 1
159        | resultArity (Inside _) = 1        | resultArity (Inside _) = 1
160          | resultArity (LoadSeq _) = 1
161          | resultArity (LoadImage _) = 1
162        | resultArity (Input _) = 0        | resultArity (Input _) = 0
163        | resultArity (Print _) = 0        | resultArity (Print _) = 0
164    
# Line 214  Line 218 
218        | arity (TensorToWorldSpace _) = 2        | arity (TensorToWorldSpace _) = 2
219        | arity (EvalKernel _) = 1        | arity (EvalKernel _) = 1
220        | arity (Inside _) = 2        | arity (Inside _) = 2
221          | arity (LoadSeq _) = 0
222          | arity (LoadImage _) = 0
223        | arity (Input _) = 0        | arity (Input _) = 0
224        | arity (Print _) = ~1        | arity (Print _) = ~1
225    
# Line 273  Line 279 
279        | same (TensorToWorldSpace(a0,a1), TensorToWorldSpace(b0,b1)) = ImageInfo.same(a0, b0) andalso samety(a1, b1)        | same (TensorToWorldSpace(a0,a1), TensorToWorldSpace(b0,b1)) = ImageInfo.same(a0, b0) andalso samety(a1, b1)
280        | same (EvalKernel(a0,a1,a2), EvalKernel(b0,b1,b2)) = sameint(a0, b0) andalso Kernel.same(a1, b1) andalso sameint(a2, b2)        | same (EvalKernel(a0,a1,a2), EvalKernel(b0,b1,b2)) = sameint(a0, b0) andalso Kernel.same(a1, b1) andalso sameint(a2, b2)
281        | same (Inside(a0,a1), Inside(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)        | same (Inside(a0,a1), Inside(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
282          | same (LoadSeq(a0,a1), LoadSeq(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)
283          | same (LoadImage(a0,a1,a2), LoadImage(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso ImageInfo.same(a2, b2)
284        | same (Input(a0), Input(b0)) = sameinput(a0, b0)        | same (Input(a0), Input(b0)) = sameinput(a0, b0)
285        | same (Print(a0), Print(b0)) = sametys(a0, b0)        | same (Print(a0), Print(b0)) = sametys(a0, b0)
286        | same _ = false        | same _ = false
# Line 333  Line 341 
341        | hash (TensorToWorldSpace(a0,a1)) = 0w257 + ImageInfo.hash a0 + hashty a1        | hash (TensorToWorldSpace(a0,a1)) = 0w257 + ImageInfo.hash a0 + hashty a1
342        | hash (EvalKernel(a0,a1,a2)) = 0w263 + hashint a0 + Kernel.hash a1 + hashint a2        | hash (EvalKernel(a0,a1,a2)) = 0w263 + hashint a0 + Kernel.hash a1 + hashint a2
343        | hash (Inside(a0,a1)) = 0w269 + ImageInfo.hash a0 + hashint a1        | hash (Inside(a0,a1)) = 0w269 + ImageInfo.hash a0 + hashint a1
344        | hash (Input(a0)) = 0w271 + hashinput a0        | hash (LoadSeq(a0,a1)) = 0w271 + hashty a0 + hashstring a1
345        | hash (Print(a0)) = 0w277 + hashtys a0        | hash (LoadImage(a0,a1,a2)) = 0w277 + hashty a0 + hashstring a1 + ImageInfo.hash a2
346          | hash (Input(a0)) = 0w281 + hashinput a0
347          | hash (Print(a0)) = 0w283 + hashtys a0
348    
349      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
350        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
# Line 392  Line 402 
402        | toString (TensorToWorldSpace(a0,a1)) = concat["TensorToWorldSpace<", ImageInfo.toString a0, ",", tyToString a1, ">"]        | toString (TensorToWorldSpace(a0,a1)) = concat["TensorToWorldSpace<", ImageInfo.toString a0, ",", tyToString a1, ">"]
403        | toString (EvalKernel(a0,a1,a2)) = concat["EvalKernel<", intToString a0, ",", Kernel.toString a1, ",", intToString a2, ">"]        | toString (EvalKernel(a0,a1,a2)) = concat["EvalKernel<", intToString a0, ",", Kernel.toString a1, ",", intToString a2, ">"]
404        | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]        | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]
405          | toString (LoadSeq(a0,a1)) = concat["LoadSeq<", tyToString a0, ",", stringToString a1, ">"]
406          | toString (LoadImage(a0,a1,a2)) = concat["LoadImage<", tyToString a0, ",", stringToString a1, ",", ImageInfo.toString a2, ">"]
407        | toString (Input(a0)) = concat["Input<", inputToString a0, ">"]        | toString (Input(a0)) = concat["Input<", inputToString a0, ">"]
408        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]
409    

Legend:
Removed from v.2011  
changed lines
  Added in v.2027

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