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

SCM Repository

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

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

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

revision 4163, Thu Jul 7 09:45:19 2016 UTC revision 4386, Tue Aug 9 13:51:49 2016 UTC
# Line 44  Line 44 
44      and strand = Strand of {      and strand = Strand of {
45          name : Atom.atom,          name : Atom.atom,
46          params : var list,          params : var list,
47            spatialDim : int option,
48          state : state_var list,          state : state_var list,
49          stateInit : method,          stateInit : method,
50          initM : method option,          initM : method option,
# Line 52  Line 53 
53        }        }
54    
55      and method = Method of {      and method = Method of {
56            usesGlobals : bool,           (* does the method contain references to globals? *)            needsW : bool,                (* does the method need the world (e.g., to print) *)
57            needsWorld : bool,            (* does the method need the world (e.g., to print) *)            hasG : bool,                  (* does the method contain references to globals? *)
58            body : block                  (* the method body *)            body : block                  (* the method body *)
59          }          }
60    
# Line 72  Line 73 
73        | S_For of var * exp * exp * block        | S_For of var * exp * exp * block
74        | S_Foreach of var * exp * block        | S_Foreach of var * exp * block
75      (* special Diderot forms *)      (* special Diderot forms *)
76          | S_MapReduce of map_reduce list * var
77        | S_LoadNrrd of var * APITypes.t * string        | S_LoadNrrd of var * APITypes.t * string
78        | S_Input of global_var * string * string option * exp option (* get input *)        | S_Input of global_var * string * string option * exp option (* get input *)
79        | S_InputNrrd of global_var * string * string option * string option (* get image/seq input *)        | S_InputNrrd of global_var * string * string option * string option (* get image/seq input *)
80        | S_New of Atom.atom * exp list   (* new strand creation *)        | S_New of Atom.atom * exp list   (* new strand creation *)
81        | S_Save of state_var * exp  (* save strand state *)        | S_Save of state_var * exp  (* save strand state *)
 (* QUESTION: do we need S_Exit? *)  
       | S_Exit  
82        | S_Print of Ty.t list * exp list        | S_Print of Ty.t list * exp list
83          | S_Return of exp
84      (* return functions for methods *)      (* return functions for methods *)
85        | S_Active        | S_Active
86        | S_Stabilize        | S_Stabilize
87        | S_Die        | S_Die
88    
89        and map_reduce
90          = MapReduce of (var * Reductions.t * func * exp list * StrandSets.t)
91    
92      and exp      and exp
93        = E_Global of global_var        = E_Global of global_var
94        | E_State of exp option * state_var        | E_State of exp option * state_var
# Line 129  Line 133 
133          name : string,                  (* name (should be unique) *)          name : string,                  (* name (should be unique) *)
134          id : Stamp.stamp,               (* unique ID *)          id : Stamp.stamp,               (* unique ID *)
135          ty : Ty.t,                      (* return type *)          ty : Ty.t,                      (* return type *)
136          paramTys : Ty.t list            (* parameter types *)          paramTys : Ty.t list,           (* parameter types *)
137            isMapFn : bool,                 (* is the function used in a parallel map? *)
138            needsW : bool,                  (* does the function need the world (e.g., to print) *)
139            hasG : bool                     (* does the function contain references to globals? *)
140        }        }
141    
142      withtype input = global_var Inputs.input      withtype input = global_var Inputs.input
143           and create = block Create.t           and create = block Create.t
144    
145        fun emptyBlk (Block{body=[], ...}) = true
146          | emptyBlk _ = false
147    
148    end    end

Legend:
Removed from v.4163  
changed lines
  Added in v.4386

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