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

SCM Repository

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

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

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

revision 2520, Mon Dec 30 05:08:47 2013 UTC revision 2521, Thu Jan 9 02:17:07 2014 UTC
# Line 20  Line 20 
20  }  }
21    
22  val outer=E.EIN{  val outer=E.EIN{
23           params = [E.TEN, E.TEN], index =[3,3],           params = [E.TEN 1, E.TEN 1], index =[3,3],
24           body = E.Prod[E.Tensor(0, [E.V 0]), E.Tensor(1, [E.V 1])]           body = E.Prod[E.Tensor(0, [E.V 0]), E.Tensor(1, [E.V 1])]
25           }           }
26    
27  val cross=E.EIN{  val cross=E.EIN{
28      params = [E.TEN, E.TEN], index =[3],      params = [E.TEN 1, E.TEN 1], index =[3],
29      body = E.Sum([(E.V 1,0,3), (E.V 2,0,3)],E.Prod[ E.Epsilon(0,1,2),E.Tensor(0, [E.V 1]), E.Tensor(1, [E.V 2])  ])      body = E.Sum([(E.V 1,0,3), (E.V 2,0,3)],E.Prod[ E.Epsilon(0,1,2),E.Tensor(0, [E.V 1]), E.Tensor(1, [E.V 2])  ])
30  }  }
31    
32  val dot=E.EIN{  val dot=E.EIN{
33      params = [E.TEN,E.TEN], index =[],      params = [E.TEN 1,E.TEN 1], index =[],
34      body = E.Sum([(E.V 0, 0, 3)],E.Prod[E.Tensor(0, [E.V 0]),E.Tensor(1, [E.V 0])])      body = E.Sum([(E.V 0, 0, 3)],E.Prod[E.Tensor(0, [E.V 0]),E.Tensor(1, [E.V 0])])
35  }  }
36    
37  val sTen=E.EIN{  val sTen=E.EIN{
38          params = [E.TEN,E.TEN], index =[3],          params = [E.TEN 1,E.TEN 1], index =[3],
39          body = E.Prod[E.Tensor(0, []),E.Tensor(1, [E.V 0])]          body = E.Prod[E.Tensor(0, []),E.Tensor(1, [E.V 0])]
40  }  }
41    
42    
43  val trace=E.EIN{  val trace=E.EIN{
44           params = [E.TEN], index =[],           params = [E.TEN 1], index =[],
45           body = E.Sum([(E.V 0, 0, 3)],E.Tensor(0, [E.V 0, E.V 0]))           body = E.Sum([(E.V 0, 0, 3)],E.Tensor(0, [E.V 0, E.V 0]))
46           }           }
47    
48    
49  val traceA=E.EIN{  val traceA=E.EIN{
50           params = [E.TEN,E.TEN], index =[],           params = [E.TEN 1,E.TEN 1], index =[],
51           body = E.Add[E.Sum([(E.V 0, 0, 3)],E.Tensor(0, [E.V 0, E.V 0])),           body = E.Add[E.Sum([(E.V 0, 0, 3)],E.Tensor(0, [E.V 0, E.V 0])),
52              E.Tensor(1,[])]              E.Tensor(1,[])]
53           }           }
54    
55  val traceB=E.EIN{  val traceB=E.EIN{
56           params = [E.TEN,E.TEN,E.TEN], index =[],           params = [E.TEN 1,E.TEN 1,E.TEN 1], index =[],
57           body = E.Add[E.Tensor(0,[]),E.Sum([(E.V 0, 0, 3)],E.Tensor(1, [E.V 0, E.V 0])),           body = E.Add[E.Tensor(0,[]),E.Sum([(E.V 0, 0, 3)],E.Tensor(1, [E.V 0, E.V 0])),
58           E.Tensor(2,[])]           E.Tensor(2,[])]
59           }           }
# Line 65  Line 65 
65           }           }
66    
67  val conv=E.EIN{  val conv=E.EIN{
68          params = [E.FLD(3),E.TEN], index =[2],          params = [E.FLD(3),E.TEN 1], index =[2],
69          body = E.Conv(0,[E.V 0],1,[])          body = E.Conv(0,[E.V 0],1,[])
70  }  }
71    
# Line 75  Line 75 
75  }  }
76    
77  val addT3=E.EIN{  val addT3=E.EIN{
78      params = [E.TEN,E.TEN], index =[2,3],      params = [E.TEN 1,E.TEN 1], index =[2,3],
79      body = E.Add[E.Prod[E.Tensor(1,[E.V 0,E.V 1]),E.Tensor(0,[E.V 1])], E.Tensor(0,[E.V 0])]      body = E.Add[E.Prod[E.Tensor(1,[E.V 0,E.V 1]),E.Tensor(0,[E.V 1])], E.Tensor(0,[E.V 0])]
80  }  }
81    
# Line 90  Line 90 
90           }           }
91    
92  val x=E.EIN{  val x=E.EIN{
93           params = [E.TEN,E.FLD(3),E.TEN], index =[3],           params = [E.TEN 1,E.FLD(3),E.TEN 1], index =[3],
94           body = E.Add[E.Tensor(0,[]),           body = E.Add[E.Tensor(0,[]),
95              E.Sum([(E.V 0,0,3)],E.Apply(E.Partial [E.V 0],E.Field(1, [E.V 0]))),E.Tensor(2,[])]              E.Sum([(E.V 0,0,3)],E.Apply(E.Partial [E.V 0],E.Field(1, [E.V 0]))),E.Tensor(2,[])]
96           }           }
# Line 106  Line 106 
106  }  }
107    
108  val y=E.EIN{  val y=E.EIN{
109          params = [E.TEN,E.FLD(3),E.TEN,E.TEN,E.TEN], index =[3],          params = [E.TEN 1,E.FLD(3),E.TEN 1,E.TEN 1,E.TEN 1], index =[3],
110          body = E.Add[E.Tensor(0,[]),          body = E.Add[E.Tensor(0,[]),
111                  E.Sum([(E.V 1,0,3)],E.Apply(E.Partial [E.V 1],E.Field(1, [E.V 1]))),                  E.Sum([(E.V 1,0,3)],E.Apply(E.Partial [E.V 1],E.Field(1, [E.V 1]))),
112                  E.Sum([(E.V 1, 0, 3)], E.Prod[E.Tensor(2,[E.V 1]),E.Tensor(3,[E.V 1])]),                  E.Sum([(E.V 1, 0, 3)], E.Prod[E.Tensor(2,[E.V 1]),E.Tensor(3,[E.V 1])]),
# Line 114  Line 114 
114          }          }
115    
116  val z=E.EIN{  val z=E.EIN{
117      params = [E.TEN,E.TEN], index =[],      params = [E.TEN 1,E.TEN 1], index =[],
118      body = E.Add[E.Prod[E.Tensor(0, []),E.Tensor(1, [E.V 0])]]      body = E.Add[E.Prod[E.Tensor(0, []),E.Tensor(1, [E.V 0])]]
119      }      }
120    
121  val b=E.EIN{  val b=E.EIN{
122      params = [E.TEN,E.TEN,E.TEN,E.TEN], index =[3],      params = [E.TEN 1,E.TEN 1,E.TEN 1,E.TEN 1], index =[3],
123      body = E.Add[      body = E.Add[
124          E.Sum([(E.V 1,0,3),(E.V 2,0,3)],E.Prod[E.Tensor(0, [E.V 1,E.V 2]),E.Tensor(1, [E.V 1,E.V 2,E.V 0])]),          E.Sum([(E.V 1,0,3),(E.V 2,0,3)],E.Prod[E.Tensor(0, [E.V 1,E.V 2]),E.Tensor(1, [E.V 1,E.V 2,E.V 0])]),
125       E.Sum([(E.V 1,0,3)],E.Prod[E.Tensor(2, [E.V 1]),E.Tensor(3, [E.V 1])])       E.Sum([(E.V 1,0,3)],E.Prod[E.Tensor(2, [E.V 1]),E.Tensor(3, [E.V 1])])
# Line 129  Line 129 
129  (*inner>outer*)  (*inner>outer*)
130    
131  val z=E.EIN{  val z=E.EIN{
132      params = [E.TEN,E.TEN], index =[3],      params = [E.TEN 1,E.TEN 1], index =[3],
133      body = E.Sum([(E.V 1,0,3),(E.V 2,0,3)],E.Prod[E.Tensor(0, [E.V 1,E.V 2]),E.Tensor(1, [E.V 1,E.V 2,E.V 0])])      body = E.Sum([(E.V 1,0,3),(E.V 2,0,3)],E.Prod[E.Tensor(0, [E.V 1,E.V 2]),E.Tensor(1, [E.V 1,E.V 2,E.V 0])])
134  }  }
135    
136    
137  val c=E.EIN{  val c=E.EIN{
138      params = [E.TEN,E.TEN,E.TEN,E.TEN,E.TEN], index =[],      params = [E.TEN 1,E.TEN 1,E.TEN 1,E.TEN 1,E.TEN 1], index =[],
139      body =E.Prod[      body =E.Prod[
140          E.Sum([(E.V 1 ,0, 3),(E.V 2, 0, 3)],          E.Sum([(E.V 1 ,0, 3),(E.V 2, 0, 3)],
141          E.Prod[E.Epsilon(0,1,2),E.Tensor(0,[E.V 1]),E.Tensor(1,[E.V 2])]),          E.Prod[E.Epsilon(0,1,2),E.Tensor(0,[E.V 1]),E.Tensor(1,[E.V 2])]),
# Line 144  Line 144 
144  }  }
145    
146  val x1=E.EIN{  val x1=E.EIN{
147      params = [E.TEN,E.TEN], index =[3],      params = [E.TEN 1,E.TEN 1], index =[3],
148      body = E.Prod[E.Tensor(0, [E.V 0]),E.Tensor(1, [])]      body = E.Prod[E.Tensor(0, [E.V 0]),E.Tensor(1, [])]
149  }  }
150    
151    
152  val crossA=E.EIN{  val crossA=E.EIN{
153  params = [E.TEN, E.TEN,E.TEN], index =[3],  params = [E.TEN 1, E.TEN 1,E.TEN 1], index =[3],
154  body = E.Add[E.Tensor(0,[E.V 0]),E.Sum([(E.V 1,0,3), (E.V 2,0,3)],E.Prod[ E.Epsilon(0,1,2),E.Tensor(0, [E.V 1]), E.Tensor(1, [E.V 2])  ]),E.Tensor(2,[E.V 0])]  body = E.Add[E.Tensor(0,[E.V 0]),E.Sum([(E.V 1,0,3), (E.V 2,0,3)],E.Prod[ E.Epsilon(0,1,2),E.Tensor(0, [E.V 1]), E.Tensor(1, [E.V 2])  ]),E.Tensor(2,[E.V 0])]
155  }  }
156    

Legend:
Removed from v.2520  
changed lines
  Added in v.2521

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