-
Notifications
You must be signed in to change notification settings - Fork 300
Adding support for basic_as_two_terms #2024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I think this might be ready to go now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this looks good now, this PR cleanly exposes the two methods for Add and Mul with minimal overhead. We leave the door open for any future improvement, such as making this work for "all classes". This minimal approach in this PR is enough to unblock us for Gruntz.
Thanks. Can LPython generate code for the C/C++ library so that we get a gruntz code for free? |
@isuruf that's what we are working on. LPython can generate LLVM, C and C++ code, in this order of maturity. The C++ code would still call SymEngine via the C API. We are still relatively at the beginning in the Gruntz implementation, you can follow our progress here: lcompilers/lpython#2688. Indeed, eventually it will be possible to just use the generated C code, possibly include it in SymEngine. The goal is that there is no runtime overhead of using SymPy in LPython compared to using C++/SymEngine directly. |
Fixes #2018