DUNE-ACFEM (unstable)
General optimization patterns. More...
Modules | |
| SumOptimization | |
Classes | |
| struct | Dune::ACFem::Expressions::OptimizeTag< N > |
| Optimization pattern disambiguation struct. More... | |
Typedefs | |
| using | Dune::ACFem::Expressions::OptimizeTop = OptimizeTag< Policy::OptimizationLevelMax::value > |
| The top-level optmization tag. | |
| using | Dune::ACFem::Expressions::OptimizeLast = OptimizeTag< 1 > |
| Using this tag at the top-level is reserved in order to avoid infinite recursions. More... | |
| using | Dune::ACFem::Expressions::DontOptimize = OptimizeTag< 0 > |
| Bottom level is overloaded to do nothing. | |
| template<class OptOrF , class... Rest> | |
| using | Dune::ACFem::Expressions::ExpressionType = decltype(operate(std::declval< OptOrF >(), std::declval< Rest >()...)) |
| Generate the type of an expression by calling operate(). More... | |
| template<class T > | |
| using | Dune::ACFem::Expressions::EvaluatedType = decltype(evaluate(std::declval< T >())) |
| (Re-)evaluate a given expression or Expressions::Storage. | |
Functions | |
| template<class F , class T , std::enable_if_t< IsCompositionWithInverseV< F, T >, int > = 0> | |
| constexpr decltype(auto) | Dune::ACFem::Expressions::operate (OptimizeTerminal3, F &&f, T &&t) |
| optimize \(f \circ f^{-1}\) to no-op. | |
| template<class T > | |
| constexpr decltype(auto) | Dune::ACFem::Expressions::operate (DontOptimize, OperationTraits< IdentityOperation >, T &&t) |
| Default is not to optimize. More... | |
| template<class F , class... T, std::enable_if_t< IsFunctor< F >::value, int > = 0> | |
| constexpr decltype(auto) | Dune::ACFem::Expressions::operate (F &&f, T &&... t) |
| Possibly optimize the given expression template by recursing into optimize(T, Tag) with the highest supported level. | |
| template<class Optimize , class T > | |
| constexpr decltype(auto) | Dune::ACFem::Expressions::evaluate (Optimize, T &&t) |
| Evaluate an expression or expression Expressions::Storage container. | |
| template<class T > | |
| constexpr decltype(auto) | Dune::ACFem::Expressions::evaluate (T &&t) |
| Evaluate an expression or expression Expressions::Storage container. | |
Variables | |
| template<class F , class T , class SFINAE = void> | |
| constexpr bool | Dune::ACFem::Expressions::IsCompositionWithInverseV = std::is_same<typename std::decay_t<F>::InvertibleOperation, Operation<T> >::value |
| Identify composition with inverse. | |
| template<class T > | |
| constexpr bool | Dune::ACFem::Expressions::IsUnaryZeroV< F< LogicalNotOperation >, T > = ExpressionTraits<T>::isOne |
| !1 -> 0. | |
| template<class T > | |
| constexpr bool | Dune::ACFem::Expressions::IsUnaryOneV< F< LogicalNotOperation >, T > = ExpressionTraits<T>::isZero |
| !0 -> 1 | |
| template<class T0 , class T1 > | |
| constexpr bool | Dune::ACFem::Expressions::ReturnFirstV< F< LogicalOrOperation >, T0, T1 > |
| (X==1) || Y, X || 0 -> X | |
| template<class T0 , class T1 > | |
| constexpr bool | Dune::ACFem::Expressions::ReturnSecondV< F< LogicalOrOperation >, T0, T1 > |
| X || (Y==1), 0 || Y -> Y. | |
Detailed Description
General optimization patterns.
Typedef Documentation
◆ ExpressionType
template<class OptOrF , class... Rest>
| using Dune::ACFem::Expressions::ExpressionType = typedef decltype(operate(std::declval<OptOrF>(), std::declval<Rest>()...)) |
Generate the type of an expression by calling operate().
- Parameters
-
OptOrF Either an operation functor or the optimization level. Rest Remaining parameters. If OptOrF is an optimization level the pack must start with an expression functor.
◆ OptimizeLast
| using Dune::ACFem::Expressions::OptimizeLast = typedef OptimizeTag<1> |
Using this tag at the top-level is reserved in order to avoid infinite recursions.
optimize(T&&, OptimizeTop) can be specialized to do nothing for known optimization blockers like sub-expression expressions. Last optimization level.
Function Documentation
◆ operate()
template<class T >
|
constexpr |
Default is not to optimize.
Optimization functions must be implemented with a higher OptimizeTag to ease disambiguation. Note that lower optimization levels always match, so optimizability cannot be checked for by testing the presence of the optimize() function.
|
Legal Statements / Impressum |
Hosted by TU Dresden & Uni Heidelberg |
generated with Hugo v0.111.3
(Nov 2, 23:43, 2025)