matchpy icon indicating copy to clipboard operation
matchpy copied to clipboard

ANN: MatchPyCpp port to C++

Open Upabjojr opened this issue 6 years ago • 7 comments

ANNOUNCEMENT:

I have ported parts of MatchPy into C++: https://github.com/symengine/symengine/pull/1497

  • symengine library has been used for expression trees,
  • only the parts of MatchPy needed by the generated code have been ported into C++,
  • the C++ code generator is written in Python and still relies on MatchPy library.

Upabjojr avatar Mar 11 '19 09:03 Upabjojr

Thank you very much for letting us know! Are you planning to do any experiments to compare the performance of the generated C++ code to the generated Python code? I would be curious about that.

hbarthels avatar Mar 12 '19 09:03 hbarthels

Are you planning to do any experiments to compare the performance of the generated C++ code to the generated Python code? I would be curious about that.

At the moment I'm quite busy, I hope to get a GSoC student to port RUBI into C++.

Currently I'm not sure about the speed-up of C++, as many of the generators are solved (i.e. instead of yield value they return the array of values, performing all combinations). There are some solutions for this problem, but I would like to first wait and see whether coroutines will be added to the C++20 standard. Alternatively there are some tricks to force the usage of generators into C++.

If this problem is solved, I expect C++ to be a lot faster.

Upabjojr avatar Mar 12 '19 09:03 Upabjojr

@Upabjojr if the issue is still persisting and you would want a contributor to work on it I am available please let me know the pre-requisite for the same and i'd be happy to contribute.

MANIKTANEJA3 avatar Mar 21 '20 06:03 MANIKTANEJA3

Are you willing to port the code to C++20?

Upabjojr avatar Mar 21 '20 07:03 Upabjojr

Sure I’d need guidance on the same and will have to check for the methods but am in for it

MANIKTANEJA3 avatar Mar 21 '20 14:03 MANIKTANEJA3

I’ve opened a thread on the forum should I propose another application or should I start working on it? Please guide me as the deadline is approaching . Thank you

On Sun, 22 Mar 2020 at 2:38 PM, Francesco Bonazzi [email protected] wrote:

If you're interested, open an issue in SymEngine or a thread on SymPy's forum: https://groups.google.com/forum/#!forum/sympy

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/HPAC/matchpy/issues/53#issuecomment-602168700, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALW2JZBHQHQCP73DDPFBN4LRIXIRLANCNFSM4G5AYO3Q .

MANIKTANEJA3 avatar Mar 25 '20 13:03 MANIKTANEJA3

Also @Upabjojr I've read through your work and the implementations before starting off to work on the port. I've also read through the following repository https://github.com/luncliff/coroutine/tree/master/interface/coroutine . Correct me if I'm wrong here ; The steps to port the code is to pick any function create a header file for the same and then the implementation? because i saw both (.h) and (.cpp) files in SymEngine's repository.

MANIKTANEJA3 avatar Mar 25 '20 22:03 MANIKTANEJA3