From 8e271ca0e4c069f8b1958d76af3553e62368bd26 Mon Sep 17 00:00:00 2001 From: Christian Zimmermann Date: Wed, 15 May 2019 20:37:00 +0200 Subject: [PATCH] anonymous range: FType + utils: anonToDynView: MultiArray -> MultiArrayBase --- src/include/helper_tools.cc.h | 4 ++-- src/include/helper_tools.h | 4 ++-- src/include/ranges/anonymous_range.h | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/include/helper_tools.cc.h b/src/include/helper_tools.cc.h index 6bc787f..eb3ff4f 100644 --- a/src/include/helper_tools.cc.h +++ b/src/include/helper_tools.cc.h @@ -194,7 +194,7 @@ namespace MultiArrayTools } template - auto anonToDynView(const MultiArray& ma) + auto anonToDynView(const MultiArrayBase& ma) -> ConstSlice> { constexpr size_t LAST = sizeof...(RangeTypes)+1; @@ -220,7 +220,7 @@ namespace MultiArrayTools } template - auto anonToDynView(const MultiArray& ma) + auto anonToDynView(const MultiArrayBase& ma) -> ConstSlice> { DynamicRangeFactory drf(rptr<0>(ma)->orig()); diff --git a/src/include/helper_tools.h b/src/include/helper_tools.h index 62d7e67..c7157e3 100644 --- a/src/include/helper_tools.h +++ b/src/include/helper_tools.h @@ -89,7 +89,7 @@ namespace MultiArrayTools -> std::shared_ptr>>; template - auto anonToDynView(const MultiArray& ma) + auto anonToDynView(const MultiArrayBase& ma) -> ConstSlice>; template @@ -97,7 +97,7 @@ namespace MultiArrayTools -> MultiArray; template - auto anonToDynView(const MultiArray& ma) + auto anonToDynView(const MultiArrayBase& ma) -> ConstSlice>; template diff --git a/src/include/ranges/anonymous_range.h b/src/include/ranges/anonymous_range.h index fc6089e..78ac54f 100644 --- a/src/include/ranges/anonymous_range.h +++ b/src/include/ranges/anonymous_range.h @@ -66,7 +66,8 @@ namespace MultiArrayTools typedef typename RangeInterface::IndexType IndexType; typedef GenSingleRange RangeType; typedef size_t MetaType; - + typedef AnonymousRangeFactory FType; + virtual size_t size() const final; virtual size_t dim() const final;