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

SCM Repository

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

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

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

revision 4235, Tue Jul 19 22:26:44 2016 UTC revision 4236, Wed Jul 20 03:02:00 2016 UTC
# Line 581  Line 581 
581              }              }
582          end          end
583    
584        (* Trace: <Sigma_i F_{\alpha i, i}>  This one Sx represents both i's*)
585            fun traceFd(dim, d2, alpha) =let
586            val expindex = specialize(alpha,0)
587            val s = E.V(length(alpha))
588            in
589                E.EIN{
590                    params = [E.FLD(dim)],
591                    index = alpha,
592                    body = E.Sum([(s, 0, d2-1)], E.Field(0, expindex@[s,s]))
593                }
594            end
595    
596    
597      (************************* tranpose *************************)      (************************* tranpose *************************)
598      fun transposeT alpha =E.EIN{      fun transposeT alpha =E.EIN{
599          params = [E.TEN(subst_flag(),alpha)],          params = [E.TEN(subst_flag(),alpha)],
# Line 633  Line 646 
646                              )                              )
647      }      }
648    
649      val detF2  =E.EIN{  
650          params = [E.FLD 2], index= [],      fun detF2(dim) = E.EIN{
651            params = [E.FLD dim], index= [],
652          body= E.Op2(E.Sub,          body= E.Op2(E.Sub,
653                      E.Opn(E.Prod,[E.Field(0, mkCx [0,0]),E.Field(0, mkCx [1,1])]),                      E.Opn(E.Prod,[E.Field(0, mkCx [0,0]),E.Field(0, mkCx [1,1])]),
654                      E.Opn(E.Prod,[E.Field(0, mkCx [0,1]),E.Field(0, mkCx [1,0])]))                      E.Opn(E.Prod,[E.Field(0, mkCx [0,1]),E.Field(0, mkCx [1,0])]))
# Line 668  Line 682 
682                      E.Field(0,[mkCxSingle 2, E. V 2])]))                      E.Field(0,[mkCxSingle 2, E. V 2])]))
683          }          }
684    
685      val detF3=  
686          E.EIN{ params = [E.FLD(3)], index= [],       fun detF3 (dim) =
687            E.EIN{ params = [E.FLD(dim)], index= [],
688          body=          body=
689              E.Sum([(E.V 0,0,2)],              E.Sum([(E.V 0,0,2)],
690                  E.Opn(E.Prod,[E.Field(0,[mkCxSingle 0, E. V 0]),                  E.Opn(E.Prod,[E.Field(0,[mkCxSingle 0, E. V 0]),
# Line 680  Line 695 
695          }          }
696    
697    
698    
699      (************************* Pow **************************)      (************************* Pow **************************)
700      fun powF (dim,n) = E.EIN{params = [E.FLD(dim)],index = [], body = E.Op1(E.PowInt n, E.Field(0,[]))}      fun powF (dim,n) = E.EIN{params = [E.FLD(dim)],index = [], body = E.Op1(E.PowInt n, E.Field(0,[]))}
701      fun expF dim = E.EIN{params = [E.FLD(dim)],index = [], body = E.Op1(E.Exp,E.Field(0,[]))}      fun expF dim = E.EIN{params = [E.FLD(dim)],index = [], body = E.Op1(E.Exp,E.Field(0,[]))}

Legend:
Removed from v.4235  
changed lines
  Added in v.4236

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