Traversal of CoDiPack expressions during compile time. More...
#include <compileTimeTraversalLogic.hpp>

Public Types | |
| using | Impl = T_Impl |
| See CompileTimeTraversalLogic. | |
| using | ResultType = T_ResultType |
| See CompileTimeTraversalLogic. | |
Public Member Functions | |
| template<typename Node, typename... Args> | |
| inlinestatic ResultType constexpr | eval (Args &&... args) |
| Start the evaluation of the logic on the given expression. | |
| template<typename Node, typename... Args> | |
| inlinestatic ResultType constexpr | toLinks (Args &&... args) |
| Helper method which calls the method 'link' on all links of the node and reduces the results. | |
Interface definition | |
| inlinestatic ResultType constexpr | reduce (ResultType a, ResultType b) |
| Reduction operation for the results of two links. | |
| template<typename Node, typename... Args> | |
| inlinestatic ResultType constexpr | node (Args &&... args) |
| Called for each node in the expression. | |
| template<typename Node, typename... Args> | |
| inlinestatic ResultType constexpr | leaf (Args &&...) |
| Called for all leaf nodes in the expression. | |
| template<size_t ChildNumber, typename Child, typename Root, typename... Args> | |
| inlinestatic ResultType constexpr | link (Args &&... args) |
| Called for all links in the expression. | |
Static Public Attributes | |
| static ResultType constexpr | NeutralElement = {} |
| Neutral element of the reduction. | |
Protected Member Functions | |
| template<typename Node, typename... Args> | |
| inlinestatic ResultType constexpr | toNode (Args &&... args) |
| Helper method to distinguish between leaf nodes and normal nodes. | |
Traversal of CoDiPack expressions during compile time.
For a detailed explanation of the traversal structure please see Expression traversal.
All information must be provided as arguments and all computations must be constexpr.
| T_ResultType | Type of the computed result. |
| T_Impl | Class implementing this interface. |
|
inlineconstexpr |
Called for all leaf nodes in the expression.
Must be a constexpr.
Default: Returns NeutralElement.
|
inlineconstexpr |
Called for all links in the expression.
Implementations can call the toNode method in order to evaluate either leaf or node depending on the child.
Must be a constexpr.
Default: Call the child node and forward all arguments.
|
inlineconstexpr |
Called for each node in the expression.
Implementations can call the toLinks method in order to evaluate all links of the node.
Must be a constexpr.
Default: Call each link of the node and forward all arguments.
|
inlineconstexpr |
Reduction operation for the results of two links.
Must be a constexpr.
Default: summation.