From 96a1328601f20fadcb7dbd9b00a37021abf29069 Mon Sep 17 00:00:00 2001 From: Thomas Padioleau Date: Wed, 15 Nov 2023 17:33:44 +0100 Subject: [PATCH] Remove const for ChunkSpan --- include/ddc/mirror.hpp | 13 ++++++++++--- tests/chunk.cpp | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/ddc/mirror.hpp b/include/ddc/mirror.hpp index e3eed9971..7e0788285 100644 --- a/include/ddc/mirror.hpp +++ b/include/ddc/mirror.hpp @@ -2,6 +2,8 @@ #pragma once +#include + #include #include "ddc/chunk_span.hpp" @@ -15,7 +17,10 @@ auto create_mirror( Space const& space, ChunkSpan const& src) { - return Chunk>( + return Chunk< + std::remove_const_t, + Support, + KokkosAllocator, typename Space::memory_space>>( src.domain()); } @@ -32,8 +37,10 @@ auto create_mirror_and_copy( Space const& space, ChunkSpan const& src) { - Chunk> chunk( - src.domain()); + Chunk, + Support, + KokkosAllocator, typename Space::memory_space>> + chunk(src.domain()); deepcopy(chunk, src); return chunk; } diff --git a/tests/chunk.cpp b/tests/chunk.cpp index 94d9a4af1..978d9ab28 100644 --- a/tests/chunk.cpp +++ b/tests/chunk.cpp @@ -634,7 +634,7 @@ TEST(Chunk2DTest, Mirror) { ChunkXY chunk(dom_x_y); ddc::fill(chunk, 1.4); - auto const chunk2 = ddc::create_mirror_and_copy(chunk.span_view()); + auto const chunk2 = ddc::create_mirror_and_copy(chunk.span_cview()); for (auto&& ix : chunk.domain()) { for (auto&& iy : chunk.domain()) { // we expect complete equality, not EXPECT_DOUBLE_EQ: these are copy