mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
trying to find a way to remove functions from the ET system using explicit
expression closure statements. Not sure if this works yet
This commit is contained in:
parent
6a697be060
commit
02885ee583
@ -51,6 +51,31 @@ PARALLEL_FOR_LOOP
|
|||||||
return nrm;
|
return nrm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class Op,class T1>
|
||||||
|
inline auto sum(const LatticeUnaryExpression<Op,T1> & expr)
|
||||||
|
->typename decltype(expr.first.func(eval(0,std::get<0>(expr.second))))::scalar_object
|
||||||
|
{
|
||||||
|
return sum(closure(expr));
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class Op,class T1,class T2>
|
||||||
|
inline auto sum(const LatticeBinaryExpression<Op,T1,T2> & expr)
|
||||||
|
->typename decltype(expr.first.func(eval(0,std::get<0>(expr.second)),eval(0,std::get<1>(expr.second))))::scalar_object
|
||||||
|
{
|
||||||
|
return sum(closure(expr));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Op,class T1,class T2,class T3>
|
||||||
|
inline auto sum(const LatticeTrinaryExpression<Op,T1,T2,T3> & expr)
|
||||||
|
->typename decltype(expr.first.func(eval(0,std::get<0>(expr.second)),
|
||||||
|
eval(0,std::get<1>(expr.second)),
|
||||||
|
eval(0,std::get<2>(expr.second))
|
||||||
|
))::scalar_object
|
||||||
|
{
|
||||||
|
return sum(closure(expr));
|
||||||
|
}
|
||||||
|
|
||||||
template<class vobj>
|
template<class vobj>
|
||||||
inline typename vobj::scalar_object sum(const Lattice<vobj> &arg){
|
inline typename vobj::scalar_object sum(const Lattice<vobj> &arg){
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user