CoDiPack  2.2.0
A Code Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
codi::ExpressionTraits::NumberOfActiveTypeArguments< Expr > Struct Template Reference

Counts the number of nodes that inherit from LhsExpressionInterface in the expression. More...

#include <expressionTraits.hpp>

Inheritance diagram for codi::ExpressionTraits::NumberOfActiveTypeArguments< Expr >:

Public Types

using Base = CompileTimeTraversalLogic<size_t, NumberOfActiveTypeArguments<Expr>>
 Abbreviation for the base class type.
 
- Public Types inherited from codi::CompileTimeTraversalLogic< size_t, NumberOfActiveTypeArguments< Expr > >
using Impl
 See CompileTimeTraversalLogic.
 
using ResultType
 See CompileTimeTraversalLogic.
 

Static Public Member Functions

template<typename Node , typename = ExpressionTraits::EnableIfLhsExpression<Node>>
static size_t constexpr leaf ()
 Called for all leaf nodes in the expression.
 
- Static Public Member Functions inherited from codi::CompileTimeTraversalLogic< size_t, NumberOfActiveTypeArguments< 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 = Base::template eval<Expr>()
 See NumberOfActiveTypeArguments.
 
- Static Public Attributes inherited from codi::CompileTimeTraversalLogic< size_t, NumberOfActiveTypeArguments< Expr > >
static ResultType constexpr NeutralElement
 Neutral element of the reduction.
 

Additional Inherited Members

- Static Protected Member Functions inherited from codi::CompileTimeTraversalLogic< size_t, NumberOfActiveTypeArguments< 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.
 

Detailed Description

template<typename Expr>
struct codi::ExpressionTraits::NumberOfActiveTypeArguments< Expr >

Counts the number of nodes that inherit from LhsExpressionInterface in the expression.

Member Function Documentation

◆ leaf()

template<typename Expr >
template<typename Node , typename = ExpressionTraits::EnableIfLhsExpression<Node>>
static size_t constexpr codi::ExpressionTraits::NumberOfActiveTypeArguments< Expr >::leaf ( )
inlinestaticconstexpr

Called for all leaf nodes in the expression.

Must be a constexpr.

Default: Returns NeutralElement.


The documentation for this struct was generated from the following file: