diff --git a/src/opt/mpi/include/rop_types.cc.h b/src/opt/mpi/include/rop_types.cc.h index 813a062..3046c7f 100644 --- a/src/opt/mpi/include/rop_types.cc.h +++ b/src/opt/mpi/include/rop_types.cc.h @@ -14,24 +14,20 @@ namespace CNORXZ template constexpr decltype(auto) CROpRoot::operator()(const PosT& pos) const { - const SizeT L = mIndex->lmax().val(); - const SizeT m = mIndex->myrank(); - const SizeT dst = ( m + pos.val() ) % L; - const SizeT src = ( m - pos.val() + L ) % L; - + return (mData+mPos[pos.val()])[pos.next().val()]; } template constexpr decltype(auto) CROpRoot::operator()() const { - + return (mData+mPos[0])[0]; } template template constexpr decltype(auto) CROpRoot::rootSteps(const IndexId& id) const { - + } /*===============+ diff --git a/src/opt/mpi/include/rop_types.h b/src/opt/mpi/include/rop_types.h index 814e0fd..3f88843 100644 --- a/src/opt/mpi/include/rop_types.h +++ b/src/opt/mpi/include/rop_types.h @@ -20,7 +20,7 @@ namespace CNORXZ class CROpRoot : public COpInterface> { public: - typedef COpInterface> OI; + typedef COpInterface> OI; constexpr CROpRoot() = default; @@ -33,8 +33,11 @@ namespace CNORXZ constexpr decltype(auto) rootSteps(const IndexId& id) const; private: - const T* mData; - COpRoot + // + const T* mData; // must include all needed data, also that of other ranks (to be transmitted before!) + // maps the global (!) position to mData!! + const SizeT* mPos; // position map (needed to indicate position to data transmitted from other ranks) + Sptr mIndex; }; template