Counts the number of nodes in the expression. More...
#include <expressionTraits.hpp>
Static Public Member Functions | |
template<typename Node > | |
static size_t constexpr | node () |
Called for each node in the expression. | |
Static Public Member Functions inherited from codi::CompileTimeTraversalLogic< size_t, NumberOfOperations< Expr > > | |
static ResultType constexpr | eval (Args &&... args) |
Start the evaluation of the logic on the given expression. | |
static ResultType constexpr | reduce (ResultType a, ResultType b) |
Reduction operation for the results of two links. | |
static ResultType constexpr | node (Args &&... args) |
Called for each node in the expression. | |
static ResultType constexpr | leaf (Args &&...) |
Called for all leaf nodes in the expression. | |
static ResultType constexpr | link (Args &&... args) |
Called for all links in the expression. | |
Static Public Attributes | |
static size_t constexpr | value = NumberOfOperations::template eval<Expr>() |
See NumberOfOperations. | |
Static Public Attributes inherited from codi::CompileTimeTraversalLogic< size_t, NumberOfOperations< Expr > > | |
static ResultType constexpr | NeutralElement |
Neutral element of the reduction. | |
Additional Inherited Members | |
Public Types inherited from codi::CompileTimeTraversalLogic< size_t, NumberOfOperations< Expr > > | |
using | Impl |
See CompileTimeTraversalLogic. | |
using | ResultType |
See CompileTimeTraversalLogic. | |
Static Protected Member Functions inherited from codi::CompileTimeTraversalLogic< size_t, NumberOfOperations< Expr > > | |
static ResultType constexpr | toLinks (Args &&... args) |
Helper method which calls forEachLinkConstExpr on the node. | |
static ResultType constexpr | toNode (Args &&... args) |
Helper method to distinguish between leaf nodes and normal nodes. | |
Counts the number of nodes in the expression.
|
inlinestaticconstexpr |
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.