From f70efbeb82127c32882a19dec48d708dc53926c8 Mon Sep 17 00:00:00 2001 From: Christian Zimmermann Date: Thu, 21 Mar 2019 01:04:47 +0100 Subject: [PATCH] use ptr directly in getStepSize + NO FORWARD in OpExpr in map (corrupted EVERYTHING) --- src/include/map_range.cc.h | 2 +- src/include/ranges/rpack_num.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/include/map_range.cc.h b/src/include/map_range.cc.h index 4647453..a861f7b 100644 --- a/src/include/map_range.cc.h +++ b/src/include/map_range.cc.h @@ -18,7 +18,7 @@ namespace MultiArrayTools OpExpr::OpExpr(const MapF& mapf, const IndexPack& ipack, const std::shared_ptr& oind, size_t step, Expr ex) : mIndPtr(oind.get()), mSPos(mIndPtr->pos()), mMax(mIndPtr->max()), - mStep(step), mExpr( std::forward(ex) ), + mStep(step), mExpr( ex ), mOp(mkMapOp(mapf, ipack)), //mExt(ex.rootSteps( reinterpret_cast( mIndPtr ))) mExt( mOp.rootSteps( reinterpret_cast( mIndPtr ) ).extend diff --git a/src/include/ranges/rpack_num.h b/src/include/ranges/rpack_num.h index 3724153..8a6c65e 100644 --- a/src/include/ranges/rpack_num.h +++ b/src/include/ranges/rpack_num.h @@ -720,7 +720,9 @@ namespace MultiArrayHelper template 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(&ii); + return ip == j ? 1 : 0; + //return ii.ptrNum() == j ? 1 : 0; } };