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 4055, Mon Jun 27 14:31:45 2016 UTC revision 4056, Mon Jun 27 15:26:20 2016 UTC
# Line 153  Line 153 
153      val vecMul = vecOp2 Op.VMul      val vecMul = vecOp2 Op.VMul
154      val vecNeg = vecOp1 Op.VNeg      val vecNeg = vecOp1 Op.VNeg
155      fun vecSum (avail, dim, v) = add (avail, "vsm", Ty.realTy, IR.OP(Op.VSum dim, [v]))      fun vecSum (avail, dim, v) = add (avail, "vsm", Ty.realTy, IR.OP(Op.VSum dim, [v]))
156        fun vecDot (avail, dim, u, v) = add (avail, "vdot", Ty.realTy, IR.OP(Op.VDot dim, [u, v]))
157      end (* local *)      end (* local *)
158    
     fun vecDot (avail, vecIX, a, b) =  
           vecSum (avail, vecIX, vecMul (avail, vecIX, a, b))  
   
159      fun tensorIndex (avail, mapp, arg, []) = arg      fun tensorIndex (avail, mapp, arg, []) = arg
160        | tensorIndex (avail, mapp, arg, [ix]) = let        | tensorIndex (avail, mapp, arg, [ix]) = let
161            val Ty.TensorTy[d] = V.ty arg            val Ty.TensorTy[d] = V.ty arg

Legend:
Removed from v.4055  
changed lines
  Added in v.4056

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