diff --git a/src/multi_array_operation.h b/src/multi_array_operation.h index bb05787..d9100f0 100644 --- a/src/multi_array_operation.h +++ b/src/multi_array_operation.h @@ -325,10 +325,17 @@ namespace MultiArrayTools block(blockIndex); second.block(blockIndex); - + //size_t cnt = 0; + //std::clock_t cs = clock(); for(*mIndex = 0; mIndex->pos() != mIndex->max(); mIndex->pp(blockIndexNum) ){ + //std::clock_t c1 = clock(); get() = mSecond.get(); + //std::clock_t c2 = clock(); + //cnt += c2 - c1; } + //std::clock_t ce = clock(); + //std::cout << "total time = " << ce - cs << std::endl; + //std::cout << "calc time = " << cnt << std::endl; } template diff --git a/src/ranges/rpack_num.h b/src/ranges/rpack_num.h index 8df1a34..ffe64c9 100644 --- a/src/ranges/rpack_num.h +++ b/src/ranges/rpack_num.h @@ -167,9 +167,8 @@ namespace MultiArrayHelper template static size_t makePos(const std::tuple...>& iPtrTup) { - auto ID = std::get(iPtrTup)->id(); - return std::get(iPtrTup)->pos() + - RPackNum::makePos(iPtrTup) * std::get(iPtrTup)->max(); + const auto& idx = *std::get(iPtrTup); + return idx.pos() + RPackNum::makePos(iPtrTup) * idx.max(); } template @@ -328,7 +327,6 @@ namespace MultiArrayHelper template static size_t makePos(const std::tuple...>& iPtrTup) { - auto ID = std::get<0>(iPtrTup)->id(); return std::get<0>(iPtrTup)->pos(); }