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/ein-to-vector.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/mid-to-low/ein-to-vector.sml

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

revision 3684, Thu Feb 18 22:56:48 2016 UTC revision 3685, Wed Feb 24 22:17:45 2016 UTC
# Line 34  Line 34 
34    (* vector negation *)    (* vector negation *)
35      val negV : AvailRHS.t * index_env * param -> LowIR.var      val negV : AvailRHS.t * index_env * param -> LowIR.var
36    
37      (* vector sum of a sequence of vectors *)
38        val addV : AvailRHS.t * index_env * param * param list -> LowIR.var
39    
40    end = struct    end = struct
41    
42      structure IR = LowIR      structure IR = LowIR
# Line 86  Line 89 
89            end            end
90    
91    (* vector addition *)    (* vector addition *)
92      fun addV (avail, mapp, u, v) = let      fun addV (avail, mapp, u, vs) = let
93            val u = paramToVar (avail, mapp, u)
94            val vs = List.map (fn v => paramToVar (avail, mapp, v)) vs
95            val Ty.TensorTy[dim] = IR.Var.ty u
96          in          in
97              Mk.reduce (avail, fn (avail, u, v) => Mk.vecAdd(avail, dim, u, v), u::vs)
98          end          end
99    
100    end    end

Legend:
Removed from v.3684  
changed lines
  Added in v.3685

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