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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/ein/mkoperators.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/ein/mkoperators.sml

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

revision 2506, Fri Nov 8 00:05:57 2013 UTC revision 2507, Mon Nov 11 20:03:02 2013 UTC
# Line 126  Line 126 
126          }          }
127          end          end
128    
129      (*Vector Examples : <T_i * T_j>_ij*)      (*Vector Examples : <T_i * T_j>_ij..t0⊗t1*)
130      fun outerProduct(dimA,dimB) =E.EIN{      fun outerProduct(dimA,dimB) =E.EIN{
131          params = [E.TEN, E.TEN],          params = [E.TEN, E.TEN],
132          index= [dimA,dimB],          index= [dimA,dimB],
# Line 155  Line 155 
155          }          }
156    
157    
158      (*crossProduct is on 3D vectors *)      (*crossProduct is on 3D vectors ..vec3 t8=t0 × t1; *)
159      val crossProduct = E.EIN{      val crossProduct = E.EIN{
160          params = [E.TEN, E.TEN],          params = [E.TEN, E.TEN],
161          index= [3],          index= [3],
# Line 276  Line 276 
276      fun conv(dim,shape) =let      fun conv(dim,shape) =let
277          val (index', expindex')= specialize(shape,0)          val (index', expindex')= specialize(shape,0)
278          in E.EIN{          in E.EIN{
279              params = [E.FLD(dim),E.TEN],              params = [E.IMG(dim),E.KRN],
280              index = index',              index = index',
281              body= E.Conv(0,expindex',1,[])              body= E.Conv(0,expindex',1,[])
282          }          }
# Line 304  Line 304 
304      val curl3d=E.EIN{      val curl3d=E.EIN{
305          params = [E.TEN],          params = [E.TEN],
306          index = [3],          index = [3],
307          body = E.Sum([(E.V 1,0,3), (E.V 2,0,3)],E.Apply( E.Partial([E.V 1]), E.Prod[E.Epsilon(0, 1, 2), E.Field(0,[E.V 2])]))          body = E.Sum([(E.V 1,0,3), (E.V 2,0,3)],E.Prod[E.Epsilon(0, 1, 2),E.Apply( E.Partial([E.V 1]), E.Field(0,[E.V 2]))])
308      }      }
309    
310      (*Scalars*)      (*Scalars*)

Legend:
Removed from v.2506  
changed lines
  Added in v.2507

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