diff --git a/src/include/map_range.h b/src/include/map_range.h index 68307a6..6fa38c8 100644 --- a/src/include/map_range.h +++ b/src/include/map_range.h @@ -53,7 +53,7 @@ namespace MultiArrayTools class OpExpr { public: - typedef typename Index::OIType OIType; + //typedef typename Index::OIType OIType; //typedef SingleIndex OIType; static constexpr size_t LAYER = Expr::LAYER + 1; static constexpr size_t SIZE = Expr::SIZE + Op::SIZE; diff --git a/src/include/multi_array_operation.cc.h b/src/include/multi_array_operation.cc.h index 65ee2e9..1bb8393 100644 --- a/src/include/multi_array_operation.cc.h +++ b/src/include/multi_array_operation.cc.h @@ -367,6 +367,15 @@ namespace MultiArrayTools return mIndex.ifor(1,in.loop(AssignmentExpr(mOrigDataPtr,in))); } + template + template + auto OperationRoot::assignExpr(const OpClass& in) const + -> decltype(in.loop(AssignmentExpr(mOrigDataPtr,in))) + { + static_assert( OpClass::SIZE == decltype(in.rootSteps())::SIZE, "Ext Size mismatch" ); + return in.loop(AssignmentExpr(mOrigDataPtr,in)); + } + template template auto OperationRoot::assign(const OpClass& in, const std::shared_ptr& i) const diff --git a/src/include/multi_array_operation.h b/src/include/multi_array_operation.h index f1e08d0..ac4d6b7 100644 --- a/src/include/multi_array_operation.h +++ b/src/include/multi_array_operation.h @@ -315,6 +315,10 @@ namespace MultiArrayTools auto assign(const OpClass& in) const -> decltype(mIndex.ifor(1,in.loop(AssignmentExpr(mOrigDataPtr,in)))); + template + auto assignExpr(const OpClass& in) const + -> decltype(in.loop(AssignmentExpr(mOrigDataPtr,in))); + template auto assign(const OpClass& in, const std::shared_ptr& i) const -> decltype(i->ifor(1,in.loop(AssignmentExpr2,OpClass>