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

SCM Repository

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

Diff of /branches/vis12-cl/src/compiler/low-il/low-il.sml

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

revision 3080, Mon Mar 16 22:01:42 2015 UTC revision 3081, Mon Mar 16 22:08:21 2015 UTC
# Line 47  Line 47 
47      val hashinput = Inputs.hash      val hashinput = Inputs.hash
48      val inputToString = Inputs.toString      val inputToString = Inputs.toString
49    
50      (* required helper functions for the index control type type *)
51        type idxctl = IndexCtl.ctl
52        val sameidxctl = IndexCtl.same
53        val hashidxctl = IndexCtl.hash
54        val idxctlToString = IndexCtl.toString
55    
56      datatype rator      datatype rator
57        = Add of ty        = Add of ty
58        | Sub of ty        | Sub of ty
# Line 100  Line 106 
106        | IntToReal        | IntToReal
107        | RealToInt of int        | RealToInt of int
108        | ImageAddress of ImageInfo.info        | ImageAddress of ImageInfo.info
109          | ControlIndex of ImageInfo.info * idxctl * int
110        | LoadVoxels of ImageInfo.info * int        | LoadVoxels of ImageInfo.info * int
111        | PosToImgSpace of ImageInfo.info        | PosToImgSpace of ImageInfo.info
112        | TensorToWorldSpace of ImageInfo.info * ty        | TensorToWorldSpace of ImageInfo.info * ty
# Line 163  Line 170 
170        | resultArity IntToReal = 1        | resultArity IntToReal = 1
171        | resultArity (RealToInt _) = 1        | resultArity (RealToInt _) = 1
172        | resultArity (ImageAddress _) = 1        | resultArity (ImageAddress _) = 1
173          | resultArity (ControlIndex _) = 1
174        | resultArity (LoadVoxels _) = 1        | resultArity (LoadVoxels _) = 1
175        | resultArity (PosToImgSpace _) = 1        | resultArity (PosToImgSpace _) = 1
176        | resultArity (TensorToWorldSpace _) = 1        | resultArity (TensorToWorldSpace _) = 1
# Line 226  Line 234 
234        | arity IntToReal = 1        | arity IntToReal = 1
235        | arity (RealToInt _) = 1        | arity (RealToInt _) = 1
236        | arity (ImageAddress _) = 1        | arity (ImageAddress _) = 1
237          | arity (ControlIndex _) = 2
238        | arity (LoadVoxels _) = 1        | arity (LoadVoxels _) = 1
239        | arity (PosToImgSpace _) = 2        | arity (PosToImgSpace _) = 2
240        | arity (TensorToWorldSpace _) = 2        | arity (TensorToWorldSpace _) = 2
# Line 298  Line 307 
307        | same (IntToReal, IntToReal) = true        | same (IntToReal, IntToReal) = true
308        | same (RealToInt(a0), RealToInt(b0)) = sameint(a0, b0)        | same (RealToInt(a0), RealToInt(b0)) = sameint(a0, b0)
309        | same (ImageAddress(a0), ImageAddress(b0)) = ImageInfo.same(a0, b0)        | same (ImageAddress(a0), ImageAddress(b0)) = ImageInfo.same(a0, b0)
310          | same (ControlIndex(a0,a1,a2), ControlIndex(b0,b1,b2)) = ImageInfo.same(a0, b0) andalso sameidxctl(a1, b1) andalso sameint(a2, b2)
311        | same (LoadVoxels(a0,a1), LoadVoxels(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)        | same (LoadVoxels(a0,a1), LoadVoxels(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
312        | same (PosToImgSpace(a0), PosToImgSpace(b0)) = ImageInfo.same(a0, b0)        | same (PosToImgSpace(a0), PosToImgSpace(b0)) = ImageInfo.same(a0, b0)
313        | 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)
# Line 362  Line 372 
372        | hash IntToReal = 0w233        | hash IntToReal = 0w233
373        | hash (RealToInt(a0)) = 0w239 + hashint a0        | hash (RealToInt(a0)) = 0w239 + hashint a0
374        | hash (ImageAddress(a0)) = 0w241 + ImageInfo.hash a0        | hash (ImageAddress(a0)) = 0w241 + ImageInfo.hash a0
375        | hash (LoadVoxels(a0,a1)) = 0w251 + ImageInfo.hash a0 + hashint a1        | hash (ControlIndex(a0,a1,a2)) = 0w251 + ImageInfo.hash a0 + hashidxctl a1 + hashint a2
376        | hash (PosToImgSpace(a0)) = 0w257 + ImageInfo.hash a0        | hash (LoadVoxels(a0,a1)) = 0w257 + ImageInfo.hash a0 + hashint a1
377        | hash (TensorToWorldSpace(a0,a1)) = 0w263 + ImageInfo.hash a0 + hashty a1        | hash (PosToImgSpace(a0)) = 0w263 + ImageInfo.hash a0
378        | hash (Inside(a0,a1)) = 0w269 + ImageInfo.hash a0 + hashint a1        | hash (TensorToWorldSpace(a0,a1)) = 0w269 + ImageInfo.hash a0 + hashty a1
379        | hash (ImageDim(a0,a1)) = 0w271 + ImageInfo.hash a0 + hashint a1        | hash (Inside(a0,a1)) = 0w271 + ImageInfo.hash a0 + hashint a1
380        | hash (LoadSeq(a0,a1)) = 0w277 + hashty a0 + hashstring a1        | hash (ImageDim(a0,a1)) = 0w277 + ImageInfo.hash a0 + hashint a1
381        | hash (LoadImage(a0,a1)) = 0w281 + hashty a0 + hashstring a1        | hash (LoadSeq(a0,a1)) = 0w281 + hashty a0 + hashstring a1
382        | hash (Input(a0)) = 0w283 + hashinput a0        | hash (LoadImage(a0,a1)) = 0w283 + hashty a0 + hashstring a1
383        | hash (InputWithDefault(a0)) = 0w293 + hashinput a0        | hash (Input(a0)) = 0w293 + hashinput a0
384        | hash (Print(a0)) = 0w307 + hashtys a0        | hash (InputWithDefault(a0)) = 0w307 + hashinput a0
385          | hash (Print(a0)) = 0w311 + hashtys a0
386    
387      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
388        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
# Line 425  Line 436 
436        | toString IntToReal = "IntToReal"        | toString IntToReal = "IntToReal"
437        | toString (RealToInt(a0)) = concat["RealToInt<", intToString a0, ">"]        | toString (RealToInt(a0)) = concat["RealToInt<", intToString a0, ">"]
438        | toString (ImageAddress(a0)) = concat["ImageAddress<", ImageInfo.toString a0, ">"]        | toString (ImageAddress(a0)) = concat["ImageAddress<", ImageInfo.toString a0, ">"]
439          | toString (ControlIndex(a0,a1,a2)) = concat["ControlIndex<", ImageInfo.toString a0, ",", idxctlToString a1, ",", intToString a2, ">"]
440        | toString (LoadVoxels(a0,a1)) = concat["LoadVoxels<", ImageInfo.toString a0, ",", intToString a1, ">"]        | toString (LoadVoxels(a0,a1)) = concat["LoadVoxels<", ImageInfo.toString a0, ",", intToString a1, ">"]
441        | toString (PosToImgSpace(a0)) = concat["PosToImgSpace<", ImageInfo.toString a0, ">"]        | toString (PosToImgSpace(a0)) = concat["PosToImgSpace<", ImageInfo.toString a0, ">"]
442        | toString (TensorToWorldSpace(a0,a1)) = concat["TensorToWorldSpace<", ImageInfo.toString a0, ",", tyToString a1, ">"]        | toString (TensorToWorldSpace(a0,a1)) = concat["TensorToWorldSpace<", ImageInfo.toString a0, ",", tyToString a1, ">"]

Legend:
Removed from v.3080  
changed lines
  Added in v.3081

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