forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[df] Ensure execution order of Define operations is guaranteed
In the RDataFrame computation graph execution, the `RAction::Run` method is responsible for requesting the values from the readers that are necessary for that action. This is done by calling `RColumnReaderBase::Get` with the correct template type given by the variadic argument type list of the action, which corresponds to the list of column types that action requires. So far, this variadic template function call was done by simply unpacking the argument pack as the arguments to the `Exec` function of the action helper data member. This meant that the execution order was never guaranteed (undefined until C++17, unspecified since), according to the explanation at https://en.cppreference.com/w/cpp/language/eval_order. This commit ensures that the execution order of the calls to the `Get` method of the readers is done left to right, following the same order of the template parameter pack. This is done by using the sequenced-before feature of the list-initialization of any C++ struct/class. A simple struct helper is used to this end.
- Loading branch information
1 parent
9b4cce7
commit e97bb9e
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters