Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-8855 Upgrade of TDataFrame for 6.12/00 release
  3. ROOT-9021

Allow more complex Filter/Define functions as strings

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed (View Workflow)
    • High
    • Resolution: Fixed
    • None
    • 6.12/00
    • 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.

      Attachments

        Activity

          People

            amadio Guilherme Amadio
            dpiparo Danilo Piparo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Actual Start: