Home My Page Projects Code Snippets Project Openings diderot

# SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/translate/translate-basis.sml
 [diderot] / branches / charisee / src / compiler / translate / translate-basis.sml

# Diff of /branches/charisee/src/compiler/translate/translate-basis.sml

revision 2414, Mon Aug 19 05:02:14 2013 UTC revision 2439, Tue Sep 24 18:37:56 2013 UTC
# Line 93  Line 93
93      fun assignEin (y, rator, xs) = [IL.ASSGN(y, IL.EINAPP(R.evalEinApp(rator, xs)))]      fun assignEin (y, rator, xs) = [IL.ASSGN(y, IL.EINAPP(R.evalEinApp(rator, xs)))]
94
95
96      fun FieldD(0)=  []
| FieldD(SK)=SK
97
98
99      fun singleScalarField(rator,y,NK,xs)=      fun singleScalarField(rator,y,NK,xs)=
# Line 112  Line 111
111
112  (****MV.toDim returns int, and DstTy.TensorTy returns intlist *)  (****MV.toDim returns int, and DstTy.TensorTy returns intlist *)
113
114    (*DK- SK-shape,NK-dim *)
115
116  (* shape is an int list, DIM is in int|variable, k-level of differntiation *)  (* shape is an int list, DIM is in int|variable, k-level of differntiation *)
117
118   (* build a table that maps Basis variables to their translation functions *)   (* build a table that maps Basis variables to their translation functions *)
# Line 144  Line 145
145                                              in                                              in
146                                                  assignEin(y,rator,xs)                                                  assignEin(y,rator,xs)
147                                              end),                                              end),

148                  (BV.add_ff,             fn (y, [_,NK,SK], [f, g])=>                  (BV.add_ff,             fn (y, [_,NK,SK], [f, g])=>
149                                          let                                          let
150                                              val einShape=FieldD(SK)
152                                              in assignEin(y, rator, [f, g])                                              in assignEin(y, rator, [f, g])
153                                              end),                                              end),
154