-
Notifications
You must be signed in to change notification settings - Fork 300
Closed
Description
Consider this example:
auto x = symbol("x");
auto y = symbol("y");
auto i2 = integer(2);
// test cse within piecewise
auto pw1 = piecewise({
{pow(add(x, y), i2), Gt(x, y)},
{sqrt(add(x, y)), boolTrue}
});
vec_pair substs;
vec_basic reduced;
cse(substs, reduced, {pw1});
std::cout << "substs.size() = " << substs.size() << std::endl;
prints:
substs.size() = 0
I've tried stepping through the code in the debugger but couldn't quite figure out why it isn't identifying x+y
as a common subexpression (I do find it hard to debug using gdb/lldb compared to e.g. Java or Python: many operators on standard containers e.g. []
seem to get inlined even with -DCMAKE_BUILD_TYPE=Debug
)
Has anyone else experienced this/have any insight?
Metadata
Metadata
Assignees
Labels
No labels