assignExpr function
This commit is contained in:
parent
33d321d529
commit
8e91aae948
3 changed files with 14 additions and 1 deletions
|
@ -53,7 +53,7 @@ namespace MultiArrayTools
|
||||||
class OpExpr
|
class OpExpr
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef typename Index::OIType OIType;
|
//typedef typename Index::OIType OIType;
|
||||||
//typedef SingleIndex<typename Op::value_type,STYPE> OIType;
|
//typedef SingleIndex<typename Op::value_type,STYPE> OIType;
|
||||||
static constexpr size_t LAYER = Expr::LAYER + 1;
|
static constexpr size_t LAYER = Expr::LAYER + 1;
|
||||||
static constexpr size_t SIZE = Expr::SIZE + Op::SIZE;
|
static constexpr size_t SIZE = Expr::SIZE + Op::SIZE;
|
||||||
|
|
|
@ -367,6 +367,15 @@ namespace MultiArrayTools
|
||||||
return mIndex.ifor(1,in.loop(AssignmentExpr<T,OpClass>(mOrigDataPtr,in)));
|
return mIndex.ifor(1,in.loop(AssignmentExpr<T,OpClass>(mOrigDataPtr,in)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T, class... Ranges>
|
||||||
|
template <class OpClass>
|
||||||
|
auto OperationRoot<T,Ranges...>::assignExpr(const OpClass& in) const
|
||||||
|
-> decltype(in.loop(AssignmentExpr<T,OpClass>(mOrigDataPtr,in)))
|
||||||
|
{
|
||||||
|
static_assert( OpClass::SIZE == decltype(in.rootSteps())::SIZE, "Ext Size mismatch" );
|
||||||
|
return in.loop(AssignmentExpr<T,OpClass>(mOrigDataPtr,in));
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, class... Ranges>
|
template <typename T, class... Ranges>
|
||||||
template <class OpClass, class Index>
|
template <class OpClass, class Index>
|
||||||
auto OperationRoot<T,Ranges...>::assign(const OpClass& in, const std::shared_ptr<Index>& i) const
|
auto OperationRoot<T,Ranges...>::assign(const OpClass& in, const std::shared_ptr<Index>& i) const
|
||||||
|
|
|
@ -315,6 +315,10 @@ namespace MultiArrayTools
|
||||||
auto assign(const OpClass& in) const
|
auto assign(const OpClass& in) const
|
||||||
-> decltype(mIndex.ifor(1,in.loop(AssignmentExpr<T,OpClass>(mOrigDataPtr,in))));
|
-> decltype(mIndex.ifor(1,in.loop(AssignmentExpr<T,OpClass>(mOrigDataPtr,in))));
|
||||||
|
|
||||||
|
template <class OpClass>
|
||||||
|
auto assignExpr(const OpClass& in) const
|
||||||
|
-> decltype(in.loop(AssignmentExpr<T,OpClass>(mOrigDataPtr,in)));
|
||||||
|
|
||||||
template <class OpClass, class Index>
|
template <class OpClass, class Index>
|
||||||
auto assign(const OpClass& in, const std::shared_ptr<Index>& i) const
|
auto assign(const OpClass& in, const std::shared_ptr<Index>& i) const
|
||||||
-> decltype(i->ifor(1,in.loop(AssignmentExpr2<T,OperationRoot<T,Ranges...>,OpClass>
|
-> decltype(i->ifor(1,in.loop(AssignmentExpr2<T,OperationRoot<T,Ranges...>,OpClass>
|
||||||
|
|
Loading…
Reference in a new issue