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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/ein/ein.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/ein/ein.sml

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

revision 3977, Wed Jun 15 19:06:30 2016 UTC revision 3978, Wed Jun 15 19:07:40 2016 UTC
# Line 9  Line 9 
9  structure Ein =  structure Ein =
10    struct    struct
11    
 (*TEN 0-Don't Subst,shape of arguement *)  
12      datatype param_kind      datatype param_kind
13        = TEN of bool * int list  (* the boolean specifies if the parameter is substitutable *)        = TEN of bool * int list  (* the boolean specifies if the parameter is substitutable *)
14        | FLD of int        | FLD of int
15        | KRN        | KRN
16        | IMG of int * int list        | IMG of int * int list
17  (* FIXME: need some comments here!!! *)  
18      type index_kind = int      (* placement in argument list *)
19      type field_id = int      type param_id= int
20      type tensor_id = int      (* variable index *)
     type kernel_id = int  
     type image_id = int  
21      type index_id = int      type index_id = int
22        (* binding of variable index *)
23        type index_bind = int
24    
25      datatype ein = EIN of {      datatype ein = EIN of {
26          params : param_kind list,          params : param_kind list,
27          (* Parameters to equation are either tensors or fields *)          (* Parameters to equation are either tensors or fields *)
28          (* These variables are named using de Bruijn indexing *)          (* These variables are named using de Bruijn indexing *)
29  (* QUESTION: why is this index_kind list and not index_id list? *)  (* QUESTION: why is this index_bind list and not index_id list?
30          index : index_kind list,        (* Index variables in the equation. *)  * Answer: index_bind is the range of the index_ids.
31    * Both ints but ultimately different types
32    *)
33            index : index_bind list,        (* Index variables in the equation. *)
34          body : ein_exp          body : ein_exp
35        }        }
36    
# Line 48  Line 50 
50        | ArcTangent        | ArcTangent
51  (* QUESTION: should the int be IntInf.int? *)  (* QUESTION: should the int be IntInf.int? *)
52        | PowInt of int        | PowInt of int
       | PowReal of Rational.t  
       | PowEmb of sumrange list * int  
53    
54      and binary = Sub | Div      and binary = Sub | Div
55    
# Line 63  Line 63 
63        = Const of int        = Const of int
64  (* QUESTION: should this be RealLit.t? *)  (* QUESTION: should this be RealLit.t? *)
65        | ConstR of Rational.t        | ConstR of Rational.t
66        | Tensor of tensor_id * alpha        | Tensor of param_id * alpha
67  (* FIXME: the "mu * mu" should be "index_id * index_id" in the sumrange type *)        | Delta of index_id * index_id
       | Delta of mu * mu  
68        | Epsilon of index_id * index_id * index_id        | Epsilon of index_id * index_id * index_id
69        | Eps2 of index_id * index_id        | Eps2 of index_id * index_id
70      (* High-IL Terms *)      (* High-IL Terms *)
71        | Field of field_id * alpha        | Field of param_id * alpha
72        | Lift of ein_exp        | Lift of ein_exp
73        | Conv of image_id * alpha * kernel_id * alpha        | Conv of param_id * alpha * param_id * alpha
74        | Partial of alpha        | Partial of alpha
75        | Apply of ein_exp * ein_exp        | Apply of ein_exp * ein_exp
76        | Probe of ein_exp * ein_exp        | Probe of ein_exp * ein_exp
77      (* Mid-IL Terms *)      (* Mid-IL Terms *)
78        | Value of index_id (* Lift index *)        | Value of index_id (* Lift index *)
79        | Img of image_id * alpha * pos list * int * border        | Img of param_id * alpha * pos list * int * border
80        | Krn of kernel_id * (mu * mu) list * int        | Krn of param_id * (mu * mu) list * int
81      (* Ops *)      (* Ops *)
82        | Sum of sumrange list * ein_exp        | Sum of sumrange list * ein_exp
83        | Op1 of unary * ein_exp        | Op1 of unary * ein_exp
# Line 87  Line 86 
86    
87      withtype alpha = mu list      withtype alpha = mu list
88          and pos = ein_exp          and pos = ein_exp
89  (* FIXME: the "mu" should be "index_id" in the sumrange type *)          and sumrange = index_id * int * int
         and sumrange = mu * int * int  
90    
91    end    end

Legend:
Removed from v.3977  
changed lines
  Added in v.3978

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