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) {