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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/high-il/normalize-ein.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/high-il/normalize-ein.sml

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

revision 2838, Tue Nov 25 03:40:24 2014 UTC revision 2843, Mon Dec 8 01:27:25 2014 UTC
# Line 37  Line 37 
37      | E.Apply _   => (0,E.Sum(c1,e1))      | E.Apply _   => (0,E.Sum(c1,e1))
38      | E.Delta _   => (0,E.Sum(c1,e1))      | E.Delta _   => (0,E.Sum(c1,e1))
39      | E.Epsilon _ => (0,E.Sum(c1,e1))      | E.Epsilon _ => (0,E.Sum(c1,e1))
40        | E.Eps2 _    => (0,E.Sum(c1,e1))
41      (*| E.Tensor []  => (1,e1)*)      (*| E.Tensor []  => (1,e1)*)
42      | E.Tensor _  => (0,E.Sum(c1,e1))      | E.Tensor _  => (0,E.Sum(c1,e1))
43      | E.Neg e2    => (1,E.Neg(E.Sum(c1,e2)))      | E.Neg e2    => (1,E.Neg(E.Sum(c1,e2)))
# Line 94  Line 95 
95      | E.Tensor _  => err("Tensor without Lift")      | E.Tensor _  => err("Tensor without Lift")
96      | E.Delta _   => err("Apply of Delta")      | E.Delta _   => err("Apply of Delta")
97      | E.Epsilon _ => err("Apply of Eps")      | E.Epsilon _ => err("Apply of Eps")
98        | E.Eps2 _ => err("Apply of Eps")
99      | E.Partial _ => err("Apply of Partial")      | E.Partial _ => err("Apply of Partial")
100      | E.Krn _     => err("Krn used before expand")      | E.Krn _     => err("Krn used before expand")
101      | E.Value _   => err("Value used before expand")      | E.Value _   => err("Value used before expand")
# Line 116  Line 118 
118      | E.Div (a,b) => (1,E.Div(E.Probe(a,x),E.Probe(b,x)))      | E.Div (a,b) => (1,E.Div(E.Probe(a,x),E.Probe(b,x)))
119      | E.Const _   => err("Const without Lift")      | E.Const _   => err("Const without Lift")
120      | E.Tensor _  => err("Tensor without Lift")      | E.Tensor _  => err("Tensor without Lift")
121      | E.Delta _   => err("Probe of Delta")      | E.Delta _   => (0,e1)
122      | E.Epsilon _ => err("Probe of Eps")      | E.Epsilon _ => (0,e1)
123        | E.Eps2 _    => (0,e1)
124      | E.Partial _ => err("Probe Partial")      | E.Partial _ => err("Probe Partial")
125      | E.Probe _   => err("Probe of a Probe")      | E.Probe _   => err("Probe of a Probe")
126      | E.Krn _     => err("Krn used before expand")      | E.Krn _     => err("Krn used before expand")
# Line 139  Line 142 
142              | E.Field _     => body              | E.Field _     => body
143              | E.Delta _     => body              | E.Delta _     => body
144              | E.Epsilon _   => body              | E.Epsilon _   => body
145                | E.Eps2 _   => body
146              | E.Conv _      => body              | E.Conv _      => body
147              | E.Partial _   => body              | E.Partial _   => body
148              | E.Krn _       => raise Fail"Krn before Expand"              | E.Krn _       => raise Fail"Krn before Expand"
# Line 156  Line 160 
160              | E.Sub(E.Sub(a,b),e2)          => rewriteBody (E.Sub(a,E.Add[b,e2]))              | E.Sub(E.Sub(a,b),e2)          => rewriteBody (E.Sub(a,E.Add[b,e2]))
161              | E.Sub(e1,E.Sub(c,d))          => rewriteBody(E.Add([E.Sub(e1,c),d]))              | E.Sub(e1,E.Sub(c,d))          => rewriteBody(E.Add([E.Sub(e1,c),d]))
162              | E.Sub (a,b)                   => E.Sub(rewriteBody a, rewriteBody b)              | E.Sub (a,b)                   => E.Sub(rewriteBody a, rewriteBody b)
163                | E.Div(e1 as E.Tensor(_,[_]),e2 as E.Tensor(_,[]))=>
164                        rewriteBody (E.Prod[E.Div(E.Const 1, e2),e1])
165              | E.Div(E.Div(a,b),E.Div(c,d))  => rewriteBody(E.Div(E.Prod[a,d],E.Prod[b,c]))              | E.Div(E.Div(a,b),E.Div(c,d))  => rewriteBody(E.Div(E.Prod[a,d],E.Prod[b,c]))
166              | E.Div(E.Div(a,b),c)           => rewriteBody (E.Div(a, E.Prod[b,c]))              | E.Div(E.Div(a,b),c)           => rewriteBody (E.Div(a, E.Prod[b,c]))
167              | E.Div(a,E.Div(b,c))           => rewriteBody (E.Div(E.Prod[a,c],b))              | E.Div(a,E.Div(b,c))           => rewriteBody (E.Div(E.Prod[a,c],b))

Legend:
Removed from v.2838  
changed lines
  Added in v.2843

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