diff --git a/include/pando-lib-galois/utility/gptr_monad.hpp b/include/pando-lib-galois/utility/gptr_monad.hpp index ed248839..086179f3 100644 --- a/include/pando-lib-galois/utility/gptr_monad.hpp +++ b/include/pando-lib-galois/utility/gptr_monad.hpp @@ -16,9 +16,12 @@ [&]() { \ ElementType tmp; \ using ReturnType = decltype(tmp.func()); \ - ReturnType test = \ - pando::GlobalPtr (ptrComputed##__LINE__ + 4); \ - return test; \ + pando::GlobalPtr vvec = static_cast>(ptrComputed##__LINE__); \ + pando::GlobalPtr bvec = static_cast>(vvec); \ + auto offsetVec = bvec + offsetof(ElementType,m_size); \ + auto offsetVVec = static_cast>(offsetVec); \ + ReturnType desired = *static_cast> (offsetVVec); \ + return desired; \ }() : \ [&]() { \ ElementType tmp = *ptrComputed##__LINE__; \