mkSFunc
This commit is contained in:
parent
dcce9a5eea
commit
5c9443cd63
2 changed files with 13 additions and 0 deletions
|
@ -239,6 +239,15 @@ namespace MultiArrayTools
|
|||
( std::array<std::shared_ptr<HighLevelOpBase<ROP>>,2>({mOp, in.mOp}) ) );
|
||||
}
|
||||
|
||||
template <class F, class ROP, class... ROPs>
|
||||
HighLevelOpHolder<ROP> mkSFunc(const HighLevelOpHolder<ROP>& a, const HighLevelOpHolder<ROPs>&... as)
|
||||
{
|
||||
constexpr size_t N = sizeof...(ROPs)+1;
|
||||
return HighLevelOpHolder<ROP>
|
||||
( std::make_shared<HighLevelOp<ROP,F,N>>
|
||||
( std::array<std::shared_ptr<HighLevelOpBase<ROP>>,N>({a.op(), as.op()...}) ) );
|
||||
}
|
||||
|
||||
template <class ROP>
|
||||
template <class... Indices>
|
||||
HighLevelOpHolder<ROP>& HighLevelOpHolder<ROP>::xassign(const HighLevelOpHolder& in,
|
||||
|
|
|
@ -155,6 +155,7 @@ namespace MultiArrayTools
|
|||
HighLevelOpHolder operator-(const HighLevelOpHolder& in) const;
|
||||
HighLevelOpHolder operator/(const HighLevelOpHolder& in) const;
|
||||
|
||||
|
||||
template <class... Indices>
|
||||
HighLevelOpHolder& xassign(const HighLevelOpHolder& in,
|
||||
const std::shared_ptr<DynamicIndex>& di,
|
||||
|
@ -171,6 +172,9 @@ namespace MultiArrayTools
|
|||
const std::shared_ptr<Indices>&... inds);
|
||||
};
|
||||
|
||||
template <class F, class ROP, class... ROPs>
|
||||
HighLevelOpHolder<ROP> mkSFunc(const HighLevelOpHolder<ROP>& a, const HighLevelOpHolder<ROPs>&... as);
|
||||
|
||||
|
||||
template <class ROP>
|
||||
HighLevelOpHolder<ROP> mkHLO(const ROP& op);
|
||||
|
|
Loading…
Reference in a new issue