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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/mid-to-low/mk-low-ir.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/mid-to-low/mk-low-ir.sml

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

revision 3754, Thu Apr 14 22:45:39 2016 UTC revision 3784, Wed Apr 27 18:13:26 2016 UTC
# Line 60  Line 60 
60    
61    (* tensor operations *)    (* tensor operations *)
62      val tensorIndex : AvailRHS.t * index_env * LowIR.var * Ein.alpha -> LowIR.var      val tensorIndex : AvailRHS.t * index_env * LowIR.var * Ein.alpha -> LowIR.var
63        val tensorIndexIX : AvailRHS.t * index_env * LowIR.var * int list -> LowIR.var
64    
65    (* make "x := [args]" *)    (* make "x := [args]" *)
66      val cons : AvailRHS.t * int list * LowIR.var list -> LowIR.var      val cons : AvailRHS.t * int list * LowIR.var list -> LowIR.var
# Line 162  Line 163 
163              avail, "r", Ty.realTy,              avail, "r", Ty.realTy,
164              IR.OP(Op.TensorIndex(V.ty arg, List.map (fn id => lookupMu(mapp, id)) ix), [arg]))              IR.OP(Op.TensorIndex(V.ty arg, List.map (fn id => lookupMu(mapp, id)) ix), [arg]))
165    
166        fun tensorIndexIX (avail, mapp, arg, []) = arg
167          | tensorIndexIX (avail, mapp, arg, ix) =
168          add (
169            avail, "r", Ty.realTy,
170            IR.OP(Op.TensorIndex(V.ty arg, ix), [arg]))
171    
172    
173      fun evalDelta (mapp, i, j) = let      fun evalDelta (mapp, i, j) = let
174            val i' = lookupMu (mapp, i)            val i' = lookupMu (mapp, i)
175            val j' = lookupMu (mapp, j)            val j' = lookupMu (mapp, j)

Legend:
Removed from v.3754  
changed lines
  Added in v.3784

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