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

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/translate/translate-basis.sml
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/translate/translate-basis.sml

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

revision 516, Wed Feb 9 23:10:31 2011 UTC revision 517, Thu Feb 10 11:45:00 2011 UTC
# Line 47  Line 47 
47    
48      fun vectorOp rator (y, [dv], xs) = assign (y, rator(dimVarToTensor dv), xs)      fun vectorOp rator (y, [dv], xs) = assign (y, rator(dimVarToTensor dv), xs)
49    
50      fun kernel h (y, [], []) = assign(y, Op.Kernel h, [])      fun kernel h (y, [], []) = assign(y, Op.Kernel(h, 0), [])
51    
52    (* build a table that maps Basis variables to their translation functions *)    (* build a table that maps Basis variables to their translation functions *)
53      val tbl : ((IL.var * Ty.meta_var list * IL.var list) -> IL.assign list) VTbl.hash_table = let      val tbl : ((IL.var * Ty.meta_var list * IL.var list) -> IL.assign list) VTbl.hash_table = let
# Line 86  Line 86 
86                  (BV.neg_f,              fn (y, _, xs) => assign(y, Op.NegField, xs)),                  (BV.neg_f,              fn (y, _, xs) => assign(y, Op.NegField, xs)),
87                  (BV.op_at,              fn (y, [_, dv, sv], xs) =>                  (BV.op_at,              fn (y, [_, dv, sv], xs) =>
88                                            assign(y, Op.Probe(shapeVarToTensor sv, dimVarToTensor dv), xs)),                                            assign(y, Op.Probe(shapeVarToTensor sv, dimVarToTensor dv), xs)),
89                  (BV.op_convolve,        fn (y, _, xs) => assign(y, Op.Convolve, xs)),                  (BV.op_convolve,        fn (y, [_, dv, _], xs) =>
90                                              assign(y, Op.Field(pruneDim(MV.toDim dv)), xs)),
91                  (BV.op_D,               fn (y, _, xs) => assign(y, Op.DiffField, xs)),                  (BV.op_D,               fn (y, _, xs) => assign(y, Op.DiffField, xs)),
92                  (BV.op_norm,            tensorOp Op.Norm),                  (BV.op_norm,            tensorOp Op.Norm),
93                  (BV.op_not,             simpleOp Op.Not),                  (BV.op_not,             simpleOp Op.Not),
94                  (BV.fn_CL,              fn (y, _, xs) => assign(y, Op.CL, xs)),                  (BV.fn_CL,              fn (y, _, xs) => assign(y, Op.CL, xs)),
95                  (BV.fn_convolve,        fn (y, _, [h, img]) => assign(y, Op.Convolve, [img, h])),                  (BV.fn_convolve,        fn (y, [_, dv, _], [h, img]) =>
96                                              assign(y, Op.Field(pruneDim(MV.toDim dv)), [img, h])),
97                  (BV.fn_cos,             simpleOp Op.Cos),                  (BV.fn_cos,             simpleOp Op.Cos),
98                  (BV.fn_dot,             vectorOp Op.Dot),                  (BV.fn_dot,             vectorOp Op.Dot),
99                  (BV.fn_inside,          fn (y, [_, dv, _], xs) =>                  (BV.fn_inside,          fn (y, [_, dv, _], xs) =>

Legend:
Removed from v.516  
changed lines
  Added in v.517

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