array ptr in const op root
This commit is contained in:
parent
98635027de
commit
9c5c361fde
1 changed files with 3 additions and 3 deletions
|
@ -173,7 +173,7 @@ namespace MultiArrayTools
|
||||||
const T* mDataPtr;
|
const T* mDataPtr;
|
||||||
mutable IndexType mIndex;
|
mutable IndexType mIndex;
|
||||||
mutable size_t mOff = 0;
|
mutable size_t mOff = 0;
|
||||||
//std::shared_ptr<MultiArrayBase<T,Ranges...> > mMaPtr;
|
std::shared_ptr<MultiArrayBase<T,Ranges...> > mMaPtr; // never remove this ptr, otherwise we lose temporary container instances!
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, class Op>
|
template <typename T, class Op>
|
||||||
|
@ -663,8 +663,8 @@ namespace MultiArrayTools
|
||||||
ConstOperationRoot(std::shared_ptr<MultiArrayBase<T,Ranges...> > maptr,
|
ConstOperationRoot(std::shared_ptr<MultiArrayBase<T,Ranges...> > maptr,
|
||||||
const std::shared_ptr<typename Ranges::IndexType>&... indices) :
|
const std::shared_ptr<typename Ranges::IndexType>&... indices) :
|
||||||
mDataPtr(maptr->data()),
|
mDataPtr(maptr->data()),
|
||||||
mIndex(maptr->begin())
|
mIndex(maptr->begin()),
|
||||||
//mMaPtr(maptr)
|
mMaPtr(maptr)
|
||||||
{
|
{
|
||||||
mIndex(indices...);
|
mIndex(indices...);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue