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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/mid-to-low/step3.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/mid-to-low/step3.sml

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

revision 2689, Thu Aug 28 13:59:40 2014 UTC revision 2690, Fri Aug 29 15:41:22 2014 UTC
# Line 223  Line 223 
223  fun mkprodVec(mapp,(id1,ix1,id2,ix2,vecIX, info))= let  fun mkprodVec(mapp,(id1,ix1,id2,ix2,vecIX, info))= let
224      val (vA,A)= mkVec(mapp,(id1,ix1,vecIX,info))      val (vA,A)= mkVec(mapp,(id1,ix1,vecIX,info))
225      val (vB, B)= mkVec(mapp,(id2,ix2,vecIX,info))      val (vB, B)= mkVec(mapp,(id2,ix2,vecIX,info))
226      val (vD, D)=aaV(DstOp.prodVec(vecIX,1),[vA, vB],"prodV",DstTy.TensorTy([vecIX]))      val (vD, D)=aaV(DstOp.prodVec vecIX,[vA, vB],"prodV",DstTy.TensorTy([vecIX]))
227      in      in
228          (vD, A@B@D)          (vD, A@B@D)
229      end      end
# Line 234  Line 234 
234  fun mkprodSumVec(mapp,(id1,ix1,id2,ix2,vecIX, info))=(case dotVec  fun mkprodSumVec(mapp,(id1,ix1,id2,ix2,vecIX, info))=(case dotVec
235      of 0 =>let      of 0 =>let
236          val (vD,D)=mkprodVec(mapp,(id1,ix1,id2,ix2,vecIX, info))          val (vD,D)=mkprodVec(mapp,(id1,ix1,id2,ix2,vecIX, info))
237          val (vE, E)=aaV(DstOp.sumVec(vecIX,1),[vD],"sumVec",DstTy.realTy)          val (vE, E)=aaV(DstOp.sumVec vecIX,[vD],"sumVec",DstTy.realTy)
238          in          in
239              (vE, D @E)              (vE, D @E)
240          end          end
241      | _ => let      | _ => let
242          val (vA,A)= mkVec(mapp,(id1,ix1,vecIX,info))          val (vA,A)= mkVec(mapp,(id1,ix1,vecIX,info))
243          val (vB,B)= mkVec(mapp,(id2,ix2,vecIX,info))          val (vB,B)= mkVec(mapp,(id2,ix2,vecIX,info))
244          val (vE,E)=aaV(DstOp.dotVec(vecIX,1),[vA,vB],"dotVec",DstTy.realTy)          val (vE,E)=aaV(DstOp.dotVec vecIX,[vA,vB],"dotVec",DstTy.realTy)
245          in          in
246              (vE, E)              (vE, E)
247          end          end

Legend:
Removed from v.2689  
changed lines
  Added in v.2690

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