Details
-
Sub-task
-
Status: Closed (View Workflow)
-
High
-
Resolution: Fixed
-
None
-
None
-
None
Description
Presently, both Filters and Defines can be jitted. This is great and works as follows.
An expression `E` involving 2 branches called `branch1` and `branch2` is written by the user. Variables are called like the branches and a lambda is created like this:
[](T1& branch1, T2& branch2){ return E;}
|
Unfortunately, often, especially in PyROOT, one may be forced to write something slightly more complex than an expression which can be prepended with a return and enclosed into some braces.
For example `E` could be `vector<double> px; for (auto&& mu : mus) px.emplace_back(mu.Px()); return px;`.
It would be nice to support expressions such as the one above, making sure that if a return is available, no return is prepended. Clearly this heuristic, despite being obvious, opens up to more possible mistakes which lead to non-jittable lambdas. The error messages need to be very expressive in such cases.