Subject: Re: [proto] Precomputing common matrix products in an expression
From: Bart Janssens (bart.janssens_at_[hidden])
Date: 2012-07-13 18:42:42
On Fri, Jul 13, 2012 at 11:55 PM, Eric Niebler <eric_at_[hidden]> wrote:
> On 7/13/2012 12:51 PM, Bart Janssens wrote:
> This is an instance of the larger "common subexpression elimination"
> problem. The problem is complicated by the fact that it can't be solved
> with type information alone. u_adv*nable(u) might have the same type as
> u_adv*nable(v) but different values. A hybrid solution is needed where
> you cache a set of results indexed both by type information and the
> identities (addresses) of the constituents of the subexpressions. This
> is hard, and nobody has attempted it yet. I can give you encouragement,
> but not guidance. If you find a general and elegant solution, it would
> certainly be worth putting in Proto, since lots of folks would benefit.
OK, in my case things are somewhat simpler after all then, since every
multiplication does have a distinct type, the u and u_adv are also
proto terminals, distinguished using an mpl integer, so that's why I
was hoping that a fusion map combined with some clever expression
analysis would suffice.
Proto list run by eric at boostpro.com