loopy icon indicating copy to clipboard operation
loopy copied to clipboard

[Enhancement] Transformation to hoist terms in a reduction that are sound due to the distributive property

Open kaushikcfd opened this issue 3 years ago • 0 comments

A desirable test case for this would be:

out[x, e, i] = sum([r, j], sum([j], Jac[x, e, r] * Rdiff[r, i, j] * u[e, j]))

should be transformed to

out[x, e, i] = sum([r, j], Jac[x, e, r] * sum([j], Rdiff[r, i, j] * u[e, j]))

A similar realization can occur for any reduction containing LogicalOr nodes.

(Was suggested by @inducer in a personal chat)

kaushikcfd avatar Feb 15 '22 19:02 kaushikcfd