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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/ein/ein-util.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/ein/ein-util.sml

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

revision 3977, Wed Jun 15 19:06:30 2016 UTC revision 3978, Wed Jun 15 19:07:40 2016 UTC
# Line 41  Line 41 
41            | sameOp1 (E.Tangent, E.Tangent) = true            | sameOp1 (E.Tangent, E.Tangent) = true
42            | sameOp1 (E.ArcTangent, E.ArcTangent) = true            | sameOp1 (E.ArcTangent, E.ArcTangent) = true
43            | sameOp1 (E.PowInt n1, E.PowInt n2) = (n1 = n2)            | sameOp1 (E.PowInt n1, E.PowInt n2) = (n1 = n2)
           | sameOp1 (E.PowReal r1, E.PowReal r2) = Rational.same(r1, r2)  
           | sameOp1 (E.PowEmb(sx1, n1), E.PowEmb(sx2, n2)) = (n1 = n2) andalso sameSx(sx1, sx2)  
44            | sameOp1 _ = false            | sameOp1 _ = false
45          fun same (e1, e2) = (case (e1, e2)          fun same (e1, e2) = (case (e1, e2)
46                 of (E.Const c1, E.Const c2) => (c1 = c2)                 of (E.Const c1, E.Const c2) => (c1 = c2)
# Line 50  Line 48 
48                  | (E.Tensor(id1, ix1), E.Tensor(id2, ix2)) =>                  | (E.Tensor(id1, ix1), E.Tensor(id2, ix2)) =>
49                      (id1 = id2) andalso sameIndex(ix1, ix2)                      (id1 = id2) andalso sameIndex(ix1, ix2)
50                  | (E.Delta(ix1, jx1), E.Delta(ix2, jx2)) =>                  | (E.Delta(ix1, jx1), E.Delta(ix2, jx2)) =>
51                      sameIndex ([ix1, jx1], [ix2, jx2])                      (ix1 = ix2) andalso (jx1 = jx2)
52                  | (E.Epsilon(i1, j1, k1), E.Epsilon(i2, j2, k2)) =>                  | (E.Epsilon(i1, j1, k1), E.Epsilon(i2, j2, k2)) =>
53                      (i1 = i2) andalso (j1 = j2) andalso (k1 = k2)                      (i1 = i2) andalso (j1 = j2) andalso (k1 = k2)
54                  | (E.Eps2(i1, j1), E.Eps2(i2, j2)) => (i1 = i2) andalso (j1 = j2)                  | (E.Eps2(i1, j1), E.Eps2(i2, j2)) => (i1 = i2) andalso (j1 = j2)
# Line 137  Line 135 
135                       | E.Neg => 0w59 + hash' e2                       | E.Neg => 0w59 + hash' e2
136                       | E.Sqrt => 0w67 + hash' e2                       | E.Sqrt => 0w67 + hash' e2
137                       | E.PowInt _ => 0w107 + hash' e2                       | E.PowInt _ => 0w107 + hash' e2
                      | E.PowReal _ => 0w109 + hash' e2  
138                       | E.Exp => 0w151 + hash' e2                       | E.Exp => 0w151 + hash' e2
                      | E.PowEmb _ => 0w157 + hash' e2  
139                     (* end case *))                     (* end case *))
140                  | E.Op2(E.Sub, e1, e2) => 0w79 + hash' e1 + hash' e2                  | E.Op2(E.Sub, e1, e2) => 0w79 + hash' e1 + hash' e2
141                  | E.Op2(E.Div, e1, e2) => 0w83 + hash' e1 + hash' e2                  | E.Op2(E.Div, e1, e2) => 0w83 + hash' e1 + hash' e2

Legend:
Removed from v.3977  
changed lines
  Added in v.3978

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