From 73214c3e9449e03b2d3f42f1664e56dd136aa116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Stefa=C5=84ski?= Date: Wed, 8 Nov 2023 09:51:43 +0100 Subject: [PATCH] review fixes change to a floating point number remove unused variables --- src/example5.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/example5.cpp b/src/example5.cpp index b19130a..8223513 100644 --- a/src/example5.cpp +++ b/src/example5.cpp @@ -7,7 +7,7 @@ namespace mhp = dr::mhp; -using T = uint16_t; +using T = float; using MDA = dr::mhp::distributed_mdarray; int main() { @@ -29,15 +29,13 @@ int main() { auto in = dr::mhp::views::submdspan(a.view(), slice_starts, slice_ends); auto out = dr::mhp::views::submdspan(b.view(), slice_starts, slice_ends); - auto in_array = &a; - auto out_array = &b; auto mdspan_stencil_op = [](auto &&v) { auto [in, out] = v; out(0, 0) = (in(-1, 0) + in(0, -1) + in(0, 0) + in(0, 1) + in(1, 0)) / 4; }; - mhp::halo(*in_array).exchange(); + mhp::halo(a).exchange(); mhp::stencil_for_each(mdspan_stencil_op, in, out); if (mhp::rank() == 0) {