DUNE-ACFEM (unstable)
TensorEinsumOptimizations
Perform the following substitutions: More...
Functions | |
template<class F , class T0 , class T1 , std::enable_if_t< IsScalarEinsumV< F, T0, T1 >, int > = 0> | |
constexpr decltype(auto) | Dune::ACFem::Tensor::Optimization::Einsum::operate (OptimizeTerminal1, F &&f, T0 &&t0, T1 &&t1) |
Replace constant contractions of rank 0 by their value. | |
template<class F , class T0 , class T1 , std::enable_if_t< ShouldCommuteContractionV< F, T0, T1 >, int > = 0> | |
constexpr decltype(auto) | Dune::ACFem::Tensor::Optimization::Einsum::operate (CommuteTag, F &&f, T0 &&t0, T1 &&t1) |
template<class F , class T0 , class T1 , std::enable_if_t< IsContractionOfConstWithEyeV< F, T0, T1 >, int > = 0> | |
constexpr auto | Dune::ACFem::Tensor::Optimization::Einsum::operate (DefaultTag, F &&, T0 &&t0, T1 &&t1) |
template<class F , class T0 , class T1 , std::enable_if_t< IsMiddleScalarNestedEinsum< F, T0, T1 >::value, int > = 0> | |
constexpr auto | Dune::ACFem::Tensor::Optimization::Einsum::operate (OptimizeNext< EinsumTag >, F &&f, T0 &&t0, T1 &&t1) |
Variables | |
template<class Seq0 , class Seq1 , class Dims , class T0 , class T1 > | |
constexpr bool | Dune::ACFem::Tensor::Optimization::Einsum::IsContractionOfConstWithEyeV< OperationTraits< EinsumOperation< Seq0, Seq1, Dims > >, T0, T1 > |
Detailed Description
Perform the following substitutions:
- total-contractions to resulting value, see IsScalarEinsum
- ordering of factors, see ShouldCommuteEinsum, ShouldCommuteTernary
- einsum with Eye's and KroneckerDelta's
Function Documentation
◆ operate() [1/3]
template<class F , class T0 , class T1 , std::enable_if_t< ShouldCommuteContractionV< F, T0, T1 >, int > = 0>
|
constexpr |
Commute non-trivial scalar contractions such that constants potentially can be factored out to the left.
References Dune::ACFem::Tensor::Optimization::Einsum::operate().
◆ operate() [2/3]
template<class F , class T0 , class T1 , std::enable_if_t< IsContractionOfConstWithEyeV< F, T0, T1 >, int > = 0>
|
constexpr |
Optimize einsum(ones,eye) by removing the contraction indices.
References Dune::ACFem::Tensor::Optimization::Einsum::operate().
◆ operate() [3/3]
template<class F , class T0 , class T1 , std::enable_if_t< IsMiddleScalarNestedEinsum< F, T0, T1 >::value, int > = 0>
|
constexpr |
Optimize T1 * (s * T2) where s is a scalar and T1 and T2 are non-scalars to s * (T1 * T2)
Referenced by Dune::ACFem::Tensor::Optimization::Einsum::operate().
Variable Documentation
◆ IsContractionOfConstWithEyeV< OperationTraits< EinsumOperation< Seq0, Seq1, Dims > >, T0, T1 >
template<class Seq0 , class Seq1 , class Dims , class T0 , class T1 >
|
inlineconstexpr |
Initial value:
=
(Dims::size() > 0
&& IsEye<T0>::value
&& IsConstantTensor<T1>::value)
constexpr std::size_t size()
Gives the number of elements in tuple-likes and std::integer_sequence.
Definition: size.hh:73
Optimize einsum(eye,ones) by removing the contraction indices.
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.80.0
(May 16, 22:29, 2024)