use ptr directly in getStepSize + NO FORWARD in OpExpr in map (corrupted EVERYTHING)
This commit is contained in:
parent
84355b3118
commit
f70efbeb82
2 changed files with 4 additions and 2 deletions
|
@ -18,7 +18,7 @@ namespace MultiArrayTools
|
|||
OpExpr<MapF,IndexPack,Expr,STYPE>::OpExpr(const MapF& mapf, const IndexPack& ipack,
|
||||
const std::shared_ptr<OIType>& oind, size_t step, Expr ex) :
|
||||
mIndPtr(oind.get()), mSPos(mIndPtr->pos()), mMax(mIndPtr->max()),
|
||||
mStep(step), mExpr( std::forward<Expr>(ex) ),
|
||||
mStep(step), mExpr( ex ),
|
||||
mOp(mkMapOp(mapf, ipack)),
|
||||
//mExt(ex.rootSteps( reinterpret_cast<std::intptr_t>( mIndPtr )))
|
||||
mExt( mOp.rootSteps( reinterpret_cast<std::intptr_t>( mIndPtr ) ).extend
|
||||
|
|
|
@ -720,7 +720,9 @@ namespace MultiArrayHelper
|
|||
template <class Index>
|
||||
static inline size_t getStepSize(const Index& ii, std::intptr_t j)
|
||||
{
|
||||
return ii.ptrNum() == j ? 1 : 0;
|
||||
const std::intptr_t ip = reinterpret_cast<std::intptr_t>(&ii);
|
||||
return ip == j ? 1 : 0;
|
||||
//return ii.ptrNum() == j ? 1 : 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue