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

SCM Repository

[diderot] View of /branches/charisee/src/compiler/ein/ein.sml
ViewVC logotype

View of /branches/charisee/src/compiler/ein/ein.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2507 - (download) (annotate)
Mon Nov 11 20:03:02 2013 UTC (5 years, 9 months ago) by cchiw
File size: 1259 byte(s)
add app-ein.sml to high-il
structure Ein =
  struct

datatype param_kind = TEN | FLD of int|KRN|IMG of int 
type index_kind =int
type field_id = int
type tensor_id = int
type kernel_id = int
type image_id = int
type index_id = int
type var = VarEin.var

datatype ein = EIN of {
            params : param_kind list,
                (* Parameters to equation are either tensors or fields *)
                (* These variables are named using de Bruijn indexing *)
            index : index_kind list,	(* Index variables in the equation. *)
            body : ein_exp
}

and mu = V of index_id| C of int

and ein_exp
    =Const of real
    | Tensor of tensor_id * alpha
    | Field of field_id* alpha
    | Krn of kernel_id* (mu*mu) list * pos
    | Delta of mu * mu
    | Value of index_id (*Lift index*)
    | Epsilon of index_id * index_id * index_id
    | Sum of (sumrange list) * ein_exp
    | Neg of ein_exp
    | Add of ein_exp list
    | Sub of ein_exp * ein_exp
    | Prod of ein_exp list
    | Div of ein_exp * ein_exp
    | Partial of alpha
    | Apply of ein_exp * ein_exp
    | Conv of image_id * alpha * kernel_id * alpha
    | Probe of ein_exp * ein_exp
    | Img of image_id*alpha*pos list

    withtype alpha= mu list
    and pos=ein_exp
    and sumrange=mu*int*int

end

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