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 1945, Fri Jul 6 14:54:21 2012 UTC revision 2009, Fri Oct 5 17:58:18 2012 UTC
# Line 89  Line 89 
89        | PosToImgSpace of ImageInfo.info        | PosToImgSpace of ImageInfo.info
90        | TensorToWorldSpace of ImageInfo.info * ty        | TensorToWorldSpace of ImageInfo.info * ty
91        | EvalKernel of int * Kernel.kernel * int        | EvalKernel of int * Kernel.kernel * int
       | LoadImage of ImageInfo.info  
92        | Inside of ImageInfo.info * int        | Inside of ImageInfo.info * int
93        | Input of ty * string * string        | Input of ty * string * string
94        | InputWithDefault of ty * string * string        | InputWithDefault of ty * string * string
95          | InputNrrd of ty * string * string
96          | InputNrrdWithDefault of ty * string * string * string
97        | Print of tys        | Print of tys
98    
99      fun resultArity (Add _) = 1      fun resultArity (Add _) = 1
# Line 150  Line 151 
151        | resultArity (PosToImgSpace _) = 1        | resultArity (PosToImgSpace _) = 1
152        | resultArity (TensorToWorldSpace _) = 1        | resultArity (TensorToWorldSpace _) = 1
153        | resultArity (EvalKernel _) = 1        | resultArity (EvalKernel _) = 1
       | resultArity (LoadImage _) = 1  
154        | resultArity (Inside _) = 1        | resultArity (Inside _) = 1
155        | resultArity (Input _) = 1        | resultArity (Input _) = 1
156        | resultArity (InputWithDefault _) = 1        | resultArity (InputWithDefault _) = 1
157          | resultArity (InputNrrd _) = 1
158          | resultArity (InputNrrdWithDefault _) = 1
159        | resultArity (Print _) = 0        | resultArity (Print _) = 0
160    
161      fun arity (Add _) = 2      fun arity (Add _) = 2
# Line 211  Line 213 
213        | arity (PosToImgSpace _) = 2        | arity (PosToImgSpace _) = 2
214        | arity (TensorToWorldSpace _) = 2        | arity (TensorToWorldSpace _) = 2
215        | arity (EvalKernel _) = 1        | arity (EvalKernel _) = 1
       | arity (LoadImage _) = 1  
216        | arity (Inside _) = 2        | arity (Inside _) = 2
217        | arity (Input _) = 0        | arity (Input _) = 0
218        | arity (InputWithDefault _) = 1        | arity (InputWithDefault _) = 1
219          | arity (InputNrrd _) = 0
220          | arity (InputNrrdWithDefault _) = 0
221        | arity (Print _) = ~1        | arity (Print _) = ~1
222    
223      fun same (Add(a0), Add(b0)) = samety(a0, b0)      fun same (Add(a0), Add(b0)) = samety(a0, b0)
# Line 272  Line 275 
275        | same (PosToImgSpace(a0), PosToImgSpace(b0)) = ImageInfo.same(a0, b0)        | same (PosToImgSpace(a0), PosToImgSpace(b0)) = ImageInfo.same(a0, b0)
276        | 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)
277        | 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)
       | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)  
278        | 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)
279        | same (Input(a0,a1,a2), Input(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)        | same (Input(a0,a1,a2), Input(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
280        | same (InputWithDefault(a0,a1,a2), InputWithDefault(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)        | same (InputWithDefault(a0,a1,a2), InputWithDefault(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
281          | same (InputNrrd(a0,a1,a2), InputNrrd(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
282          | same (InputNrrdWithDefault(a0,a1,a2,a3), InputNrrdWithDefault(b0,b1,b2,b3)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2) andalso samestring(a3, b3)
283        | same (Print(a0), Print(b0)) = sametys(a0, b0)        | same (Print(a0), Print(b0)) = sametys(a0, b0)
284        | same _ = false        | same _ = false
285    
# Line 334  Line 338 
338        | hash (PosToImgSpace(a0)) = 0w251 + ImageInfo.hash a0        | hash (PosToImgSpace(a0)) = 0w251 + ImageInfo.hash a0
339        | hash (TensorToWorldSpace(a0,a1)) = 0w257 + ImageInfo.hash a0 + hashty a1        | hash (TensorToWorldSpace(a0,a1)) = 0w257 + ImageInfo.hash a0 + hashty a1
340        | 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
341        | hash (LoadImage(a0)) = 0w269 + ImageInfo.hash a0        | hash (Inside(a0,a1)) = 0w269 + ImageInfo.hash a0 + hashint a1
342        | hash (Inside(a0,a1)) = 0w271 + ImageInfo.hash a0 + hashint a1        | hash (Input(a0,a1,a2)) = 0w271 + hashty a0 + hashstring a1 + hashstring a2
343        | hash (Input(a0,a1,a2)) = 0w277 + hashty a0 + hashstring a1 + hashstring a2        | hash (InputWithDefault(a0,a1,a2)) = 0w277 + hashty a0 + hashstring a1 + hashstring a2
344        | hash (InputWithDefault(a0,a1,a2)) = 0w281 + hashty a0 + hashstring a1 + hashstring a2        | hash (InputNrrd(a0,a1,a2)) = 0w281 + hashty a0 + hashstring a1 + hashstring a2
345        | hash (Print(a0)) = 0w283 + hashtys a0        | hash (InputNrrdWithDefault(a0,a1,a2,a3)) = 0w283 + hashty a0 + hashstring a1 + hashstring a2 + hashstring a3
346          | hash (Print(a0)) = 0w293 + hashtys a0
347    
348      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
349        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
# Line 395  Line 400 
400        | toString (PosToImgSpace(a0)) = concat["PosToImgSpace<", ImageInfo.toString a0, ">"]        | toString (PosToImgSpace(a0)) = concat["PosToImgSpace<", ImageInfo.toString a0, ">"]
401        | toString (TensorToWorldSpace(a0,a1)) = concat["TensorToWorldSpace<", ImageInfo.toString a0, ",", tyToString a1, ">"]        | toString (TensorToWorldSpace(a0,a1)) = concat["TensorToWorldSpace<", ImageInfo.toString a0, ",", tyToString a1, ">"]
402        | 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, ">"]
       | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]  
403        | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]        | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]
404        | toString (Input(a0,a1,a2)) = concat["Input<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]        | toString (Input(a0,a1,a2)) = concat["Input<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
405        | toString (InputWithDefault(a0,a1,a2)) = concat["InputWithDefault<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]        | toString (InputWithDefault(a0,a1,a2)) = concat["InputWithDefault<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
406          | toString (InputNrrd(a0,a1,a2)) = concat["InputNrrd<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
407          | toString (InputNrrdWithDefault(a0,a1,a2,a3)) = concat["InputNrrdWithDefault<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ",", stringToString a3, ">"]
408        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]
409    
410    end    end

Legend:
Removed from v.1945  
changed lines
  Added in v.2009

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