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

SCM Repository

[diderot] Diff of /branches/charisee_dev/src/compiler/high-to-mid/ProbeEin.sml
ViewVC logotype

Diff of /branches/charisee_dev/src/compiler/high-to-mid/ProbeEin.sml

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

revision 3383, Mon Nov 9 02:39:26 2015 UTC revision 3395, Tue Nov 10 18:23:07 2015 UTC
# Line 166  Line 166 
166      (*      (*
167        | multiPs([P0,P1],sx,body)=formBody(E.Sum(sx, E.Prod([P0,body,P1])))        | multiPs([P0,P1],sx,body)=formBody(E.Sum(sx, E.Prod([P0,body,P1])))
168        *)        *)
169          | multiPs([P0,P1,P2,P3],sx,body)= formBody(E.Sum(sx, E.Prod([P0,P1,P2,P3,body])))
170        | multiPs(Ps,sx,body)=formBody(E.Sum(sx, E.Prod([body]@Ps)))        | multiPs(Ps,sx,body)=formBody(E.Sum(sx, E.Prod([body]@Ps)))
171    
172    
# Line 237  Line 238 
238          val tshape=filterAlpha(alpha')@newdx          val tshape=filterAlpha(alpha')@newdx
239          val t=E.Tensor(tid,tshape)          val t=E.Tensor(tid,tshape)
240          val (splitvar,body)=(case originalb          val (splitvar,body)=(case originalb
241              of E.Sum(sx, E.Probe _)              => (false,E.Sum(sx,multiPs(Ps,newsx,t)))              of E.Sum(sx, E.Probe _)              => (*(false,E.Sum(sx,multiPs(Ps,newsx,t)))*) (true,multiPs(Ps,sx@newsx,t))
242              | E.Sum(sx,E.Prod[eps0,E.Probe _ ])  => (false,E.Sum(sx,E.Prod[eps0,multiPs(Ps,newsx,t)]))              | E.Sum(sx,E.Prod[eps0,E.Probe _ ])  => (false,E.Sum(sx,E.Prod[eps0,multiPs(Ps,newsx,t)]))
243              | _                                  => (case tsplitvar              | _                                  => (case tsplitvar
244                  of(* true =>   (true,multiMergePs(Ps,newsx,t))  (*pushes summations in place*)                  of(* true =>   (true,multiMergePs(Ps,newsx,t))  (*pushes summations in place*)
# Line 492  Line 493 
493          val _=  toStrField b*)          val _=  toStrField b*)
494    
495          in  (case var          in  (case var
496              of NONE=> ((rewriteBody(Ein.body ein),fieldset,matchField(Ein.body ein),0))          of NONE=> (toStrField b;(rewriteBody(Ein.body ein),fieldset,matchField(Ein.body ein),0))
497              | SOME v=> (("\n mapp_replacing"^(P.printerE ein)^":");( [(y,DstIL.VAR v)],fieldset, matchField(Ein.body ein),1))              | SOME v=> (("\n mapp_replacing"^(P.printerE ein)^":");( [(y,DstIL.VAR v)],fieldset, matchField(Ein.body ein),1))
498              (*end case*))              (*end case*))
499          end          end

Legend:
Removed from v.3383  
changed lines
  Added in v.3395

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