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-sums.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/ein/ein-sums.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 32  Line 32 
32      fun rewriteProdSum (pre, _, []) = rewriteProd pre      fun rewriteProdSum (pre, _, []) = rewriteProd pre
33        | rewriteProdSum (pre, outer, post) = rewriteProd (pre@[rewriteSum(outer, post)])        | rewriteProdSum (pre, outer, post) = rewriteProd (pre@[rewriteSum(outer, post)])
34    
35      fun findIndex (v, searchspace) = List.find (fn x => x = v) searchspace      fun findIndex (v, searchspace) = List.find (fn (x) => x = E.V v) searchspace
36    
37    (* findSx : sum_indexid list*ein_exp -> index_id option    (* findSx : sum_indexid list*ein_exp -> index_id option
38     * Is c in e?. Simple lookup in the searchspace     * Is c in e?. Simple lookup in the searchspace
# Line 49  Line 49 
49                | E.ConstR _                => NONE                | E.ConstR _                => NONE
50                | E.Tensor(id, [])          => NONE                | E.Tensor(id, [])          => NONE
51                | E.Tensor(id, shape)       => findIndex (c, shape)                | E.Tensor(id, shape)       => findIndex (c, shape)
52                | E.Delta(i, j)             => findIndex (c, [i, j])                | E.Delta(i, j)             => findIndex (c, [E.V i, E.V j])
53                | E.Epsilon(i, j, k)        => findIndex (c, [E.V i,E.V j,E.V k])                | E.Epsilon(i, j, k)        => findIndex (c, [E.V i,E.V j,E.V k])
54                | E.Eps2(i, j)              => findIndex (c, [E.V i,E.V j])                | E.Eps2(i, j)              => findIndex (c, [E.V i,E.V j])
55                | E.Field(_, shape)         => findIndex (c, shape)                | E.Field(_, shape)         => findIndex (c, shape)

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