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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/einTest/testSpecialize.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/einTest/testSpecialize.sml

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

revision 2495, Wed Oct 23 21:28:25 2013 UTC revision 2496, Tue Oct 29 05:29:46 2013 UTC
# Line 10  Line 10 
10      in      in
11    
12    
13    val check=[7]
14    
15                  (* Tensor Operations *)                  (* Tensor Operations *)
16    
17  val addition1T = S.transform(EinOp.addTensor, [[1,2]],[])  val addition1T = S.transform(EinOp.addTensor, [[1,2]],[])
# Line 21  Line 23 
23  val scaleT=S.transform(EinOp.scaleTensor,[[3,3]],[])  val scaleT=S.transform(EinOp.scaleTensor,[[3,3]],[])
24  val divideT=S.transform(EinOp.divideTensor,[[2,3]],[])  val divideT=S.transform(EinOp.divideTensor,[[2,3]],[])
25  val transposeT=S.transform(EinOp.transpose,[[3],[4]],[])  val transposeT=S.transform(EinOp.transpose,[[3],[4]],[])
26  val outerProductT=S.transform(EinOp.outerProduct,[[3],[3]],[])  val outerProductT=S.transform(EinOp.outerProduct,[[2],[3]],[])
27    
28    
29                  (*Inner Product*)                  (*Inner Product*)
# Line 67  Line 69 
69    
70  val gradientF=S.transform(EinOp.Grad,[[2]],[3])  val gradientF=S.transform(EinOp.Grad,[[2]],[3])
71  val hessianF=S.transform(EinOp.Grad,[[3,3]],[3])  val hessianF=S.transform(EinOp.Grad,[[3,3]],[3])
72    val divg=S.transform(EinOp.Divergence,[[0,8]] , [2])
 (*  
 val divergenceF=S.transform(EinOp.Divergence,[[3]],[3])  
 val curlF= S.transform(EinOp.Curl,[[3],[3],[3]],[3])  
 val curl2F=S.transform(EinOp.Curl,[[0],[2],[2]],[3])  
 *)  
73    
74    
75    val addTF= S.transform(EinOp.addTenField,[],[2])
76    val subTF= S.transform(EinOp.subTenField,[],[2])
77    val negF=S.transform(EinOp.negField,[[1]],[2] )
78    val co=S.transform(EinOp.conv,[[3,5]],[2])
79    
80  fun test e= P.printerE e  fun test e= P.printerE e
81    
# Line 86  Line 87 
87          val t2= [dotProduct,  mxv, vxm, mxm]          val t2= [dotProduct,  mxv, vxm, mxm]
88          val t3=[ddTtTs, ddTsTt, ddTtTt, ddTfTt]          val t3=[ddTtTs, ddTsTt, ddTtTt, ddTfTt]
89          val f1=[additionF,additionF2, additionF3, subtractionF,scaleF,divideF]          val f1=[additionF,additionF2, additionF3, subtractionF,scaleF,divideF]
90          val f2=[gradientF,hessianF]          val f2=[gradientF,hessianF,divg]
91       (* val f3=[divergenceF,curlF,curl2F]          val newbie=[addTF,subTF,negF,co]
92      *)  
93    
94      in      in
95    
# Line 99  Line 100 
100          else if (tester=3) then List.map test t3          else if (tester=3) then List.map test t3
101          else if (tester=4) then List.map test f1          else if (tester=4) then List.map test f1
102          else if (tester=5) then List.map test f2          else if (tester=5) then List.map test f2
103          (*else if (tester=6) then List.map test f3*)          else if(tester=6) then List.map test newbie
104          else List.map test tt          else List.map test tt
105      end      end
106    
107      val r=run 99      val r=List.map run check
108    
109    end; (* local *)    end; (* local *)
110    

Legend:
Removed from v.2495  
changed lines
  Added in v.2496

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