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

Counts the number of types that inherit from ConstantExpression in the expression. More...

#include <expressionTraits.hpp>

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

Public Types

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

Public Member Functions

template<typename Node, typename = EnableIfConstantExpression<Node>>
inlinestatic size_t constexpr leaf ()
 Called for all leaf nodes in the expression.
 
- Public Member Functions inherited from codi::CompileTimeTraversalLogic< size_t, NumberOfConstantTypeArguments< Expr > >
inlinestatic ResultType constexpr eval (Args &&... args)
 Start the evaluation of the logic on the given expression.
 
inlinestatic ResultType constexpr eval (Args &&... args)
 Start the evaluation of the logic on the given expression.
 
inlinestatic ResultType constexpr toLinks (Args &&... args)
 Helper method which calls the method 'link' on all links of the node and reduces the results.
 
inlinestatic ResultType constexpr toLinks (Args &&... args)
 Helper method which calls the method 'link' on all links of the node and reduces the results.
 
inlinestatic ResultType constexpr reduce (ResultType a, ResultType b)
 Reduction operation for the results of two links.
 
inlinestatic ResultType constexpr node (Args &&... args)
 Called for each node in the expression.
 
inlinestatic ResultType constexpr leaf (Args &&...)
 Called for all leaf nodes in the expression.
 
inlinestatic ResultType constexpr link (Args &&... args)
 Called for all links in the expression.
 
inlinestatic ResultType constexpr reduce (ResultType a, ResultType b)
 Reduction operation for the results of two links.
 
inlinestatic ResultType constexpr node (Args &&... args)
 Called for each node in the expression.
 
inlinestatic ResultType constexpr leaf (Args &&...)
 Called for all leaf nodes in the expression.
 
inlinestatic 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 NumberOfConstantTypeArguments.
 
- Static Public Attributes inherited from codi::CompileTimeTraversalLogic< size_t, NumberOfConstantTypeArguments< Expr > >
static ResultType constexpr NeutralElement
 Neutral element of the reduction.
 
static ResultType constexpr NeutralElement
 Neutral element of the reduction.
 

Additional Inherited Members

- Protected Member Functions inherited from codi::CompileTimeTraversalLogic< size_t, NumberOfConstantTypeArguments< Expr > >
inlinestatic ResultType constexpr toNode (Args &&... args)
 Helper method to distinguish between leaf nodes and normal nodes.
 
inlinestatic ResultType constexpr toNode (Args &&... args)
 Helper method to distinguish between leaf nodes and normal nodes.
 

Detailed Description

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

Counts the number of types that inherit from ConstantExpression in the expression.

Member Function Documentation

◆ leaf()

template<typename Expr>
template<typename Node, typename = EnableIfConstantExpression<Node>>
inlinestatic size_t constexpr codi::ExpressionTraits::NumberOfConstantTypeArguments< Expr >::leaf ( )
inlineconstexpr

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: