diff --git a/src/include/multi_array_operation.cc.h b/src/include/multi_array_operation.cc.h index 5b1c483..7262cd0 100644 --- a/src/include/multi_array_operation.cc.h +++ b/src/include/multi_array_operation.cc.h @@ -321,10 +321,10 @@ namespace MultiArrayTools } template - MExt ConstOperationRoot::rootSteps(std::intptr_t iPtrNum) const + MExt ConstOperationRoot::rootSteps(std::intptr_t iPtrNum) const { - return MExt(getStepSize( mIndex, iPtrNum )); - //return MExt(getStepSize( getRootIndices( mIndex->info() ), iPtrNum )); + return MExt(getStepSize( mIndex, iPtrNum )); + //return MExt(getStepSize( getRootIndices( mIndex->info() ), iPtrNum )); } @@ -402,10 +402,10 @@ namespace MultiArrayTools } template - MExt MetaOperationRoot::rootSteps(std::intptr_t iPtrNum) const + MExt MetaOperationRoot::rootSteps(std::intptr_t iPtrNum) const { - return MExt(getStepSize( *mIndex, iPtrNum )); - //return MExt(getStepSize( getRootIndices( mIndex->info() ), iPtrNum )); + return MExt(getStepSize( *mIndex, iPtrNum )); + //return MExt(getStepSize( getRootIndices( mIndex->info() ), iPtrNum )); } @@ -544,9 +544,9 @@ namespace MultiArrayTools } template - MExt OperationRoot::rootSteps(std::intptr_t iPtrNum) const + MExt OperationRoot::rootSteps(std::intptr_t iPtrNum) const { - return MExt(getStepSize( mIndex, iPtrNum )); + return MExt(getStepSize( mIndex, iPtrNum )); } template @@ -661,10 +661,10 @@ namespace MultiArrayTools } template - MExt ParallelOperationRoot::rootSteps(std::intptr_t iPtrNum) const + MExt ParallelOperationRoot::rootSteps(std::intptr_t iPtrNum) const { - return MExt(getStepSize( mIndex, iPtrNum )); - //return MExt(getStepSize( mIndex.info(), iPtrNum )); + return MExt(getStepSize( mIndex, iPtrNum )); + //return MExt(getStepSize( mIndex.info(), iPtrNum )); } template diff --git a/src/include/multi_array_operation.h b/src/include/multi_array_operation.h index 82303fd..5ba3b1d 100644 --- a/src/include/multi_array_operation.h +++ b/src/include/multi_array_operation.h @@ -204,7 +204,7 @@ namespace MultiArrayTools template inline ConstOperationRoot& set(ET pos); - MExt rootSteps(std::intptr_t iPtrNum = 0) const; // nullptr for simple usage with decltype + MExt rootSteps(std::intptr_t iPtrNum = 0) const; // nullptr for simple usage with decltype template Expr loop(Expr exp) const; @@ -278,7 +278,7 @@ namespace MultiArrayTools template inline MetaOperationRoot& set(ET pos); - MExt rootSteps(std::intptr_t iPtrNum = 0) const; // nullptr for simple usage with decltype + MExt rootSteps(std::intptr_t iPtrNum = 0) const; // nullptr for simple usage with decltype template Expr loop(Expr exp) const; @@ -354,7 +354,7 @@ namespace MultiArrayTools template inline OperationRoot& set(ET pos); - MExt rootSteps(std::intptr_t iPtrNum = 0) const; // nullptr for simple usage with decltype + MExt rootSteps(std::intptr_t iPtrNum = 0) const; // nullptr for simple usage with decltype template Expr loop(Expr exp) const; @@ -416,7 +416,7 @@ namespace MultiArrayTools template inline ParallelOperationRoot& set(ET pos); - MExt rootSteps(std::intptr_t iPtrNum = 0) const; // nullptr for simple usage with decltype + MExt rootSteps(std::intptr_t iPtrNum = 0) const; // nullptr for simple usage with decltype template Expr loop(Expr exp) const; diff --git a/src/include/ranges/dynamic_range.cc.h b/src/include/ranges/dynamic_range.cc.h index 0fb2ba6..3d12c40 100644 --- a/src/include/ranges/dynamic_range.cc.h +++ b/src/include/ranges/dynamic_range.cc.h @@ -102,34 +102,34 @@ namespace MultiArrayTools template - ExpressionHolder DynamicIndex::ifor(size_t step, Expr ex) const + DynamicExpression DynamicIndex::ifor(size_t step, Expr ex) const { if(mIVec.size() == 1){ - return ExpressionHolder(mIVec.back().first->ifor(step,ex)); + return mIVec.back().first->ifor(step,ex); } else { - return ExpressionHolder(ForMaker::mk(mIVec.size()-2, step, - mIVec.back().first->ifor(step,ex),mIVec)); + return ForMaker::mk(mIVec.size()-2, step, + mIVec.back().first->ifor(step,ex),mIVec); } } template - ExpressionHolder DynamicIndex::iforh(size_t step, Expr ex) const + DynamicExpression DynamicIndex::iforh(size_t step, Expr ex) const { if(mIVec.size() == 1){ - return ExpressionHolder(mIVec.back().first->iforh(step,ex)); + return mIVec.back().first->iforh(step,ex); } else { - return ExpressionHolder(ForMaker::mk(mIVec.size()-2, step, - mIVec.back().first->iforh(step,ex), - mIVec, true)); + return ForMaker::mk(mIVec.size()-2, step, + mIVec.back().first->iforh(step,ex), + mIVec, true); } } template - ExpressionHolder DynamicIndex::pifor(size_t step, Expr ex) const + DynamicExpression DynamicIndex::pifor(size_t step, Expr ex) const { return ifor(step, ex); // no multithreading here at the moment... } diff --git a/src/include/ranges/dynamic_range.h b/src/include/ranges/dynamic_range.h index 2b10cd8..e8a7116 100644 --- a/src/include/ranges/dynamic_range.h +++ b/src/include/ranges/dynamic_range.h @@ -232,13 +232,13 @@ namespace MultiArrayTools void print(size_t offset); template - ExpressionHolder ifor(size_t step, Expr ex) const; + DynamicExpression ifor(size_t step, Expr ex) const; template - ExpressionHolder iforh(size_t step, Expr ex) const; + DynamicExpression iforh(size_t step, Expr ex) const; template - ExpressionHolder pifor(size_t step, Expr ex) const; + DynamicExpression pifor(size_t step, Expr ex) const; }; diff --git a/src/include/ranges/rpack_num.h b/src/include/ranges/rpack_num.h index e0a606c..8967526 100644 --- a/src/include/ranges/rpack_num.h +++ b/src/include/ranges/rpack_num.h @@ -35,7 +35,7 @@ namespace MultiArrayHelper }; template <> - struct SubProp + struct SubProp { static constexpr size_t ISSTATIC = 1; static constexpr size_t SIZE = 1; diff --git a/src/include/xfor/exttype.h b/src/include/xfor/exttype.h index 31dbcdd..50ecbb6 100644 --- a/src/include/xfor/exttype.h +++ b/src/include/xfor/exttype.h @@ -114,14 +114,14 @@ namespace MultiArrayHelper }; template <> - class MExt + class MExt { private: size_t mExt = 0u; public: - + static constexpr size_t NUM = 0; static constexpr size_t SIZE = NUM + 1; @@ -226,45 +226,45 @@ namespace MultiArrayHelper //template <> - inline MExt::MExt(size_t ext) : mExt(ext) {} + inline MExt::MExt(size_t ext) : mExt(ext) {} //template <> template - inline MExt::MExt(size_t y, const Z& z) : + inline MExt::MExt(size_t y, const Z& z) : mExt(z.val()) {} //template <> template - inline MExt::MExt(const Y& y, const Z& z) : + inline MExt::MExt(const Y& y, const Z& z) : mExt(y.val()) {} //template <> template - inline MExt::MExt(const std::array& arr) : + inline MExt::MExt(const std::array& arr) : mExt(std::get(arr)) {} template - inline MExt::MExt(const MExt& y) : + inline MExt::MExt(const MExt& y) : mExt(y.val()) {} //template <> - inline const size_t& MExt::val() const + inline const size_t& MExt::val() const { return mExt; } //template <> - inline MExt MExt::operator+(const MExt& in) const + inline MExt MExt::operator+(const MExt& in) const { - return MExt(mExt + in.val()); + return MExt(mExt + in.val()); } //template <> - inline MExt MExt::operator*(size_t in) const + inline MExt MExt::operator*(size_t in) const { - return MExt(mExt * in); + return MExt(mExt * in); } diff --git a/src/include/xfor/xfor.h b/src/include/xfor/xfor.h index 3d86fa7..2689ca3 100644 --- a/src/include/xfor/xfor.h +++ b/src/include/xfor/xfor.h @@ -55,6 +55,7 @@ namespace MultiArrayHelper ExtT(const ExtType& in) : mExt(in) {} virtual size_t size() const override final { return sizeof(ExtType)/sizeof(size_t); } + //virtual size_t size() const override final { return ExtType::MExtSize(); } //virtual size_t rootSteps() const override final; const ExtType& ext() const { return mExt; } @@ -87,7 +88,7 @@ namespace MultiArrayHelper }; - inline MExt mkExt(size_t s) { return MExt(s); } + inline MExt mkExt(size_t s) { return MExt(s); } class ExpressionBase {