Skip to content

Commit 73214c3

Browse files
committed
review fixes
change to a floating point number remove unused variables
1 parent 114b32e commit 73214c3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/example5.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace mhp = dr::mhp;
99

10-
using T = uint16_t;
10+
using T = float;
1111
using MDA = dr::mhp::distributed_mdarray<T, 2>;
1212

1313
int main() {
@@ -29,15 +29,13 @@ int main() {
2929

3030
auto in = dr::mhp::views::submdspan(a.view(), slice_starts, slice_ends);
3131
auto out = dr::mhp::views::submdspan(b.view(), slice_starts, slice_ends);
32-
auto in_array = &a;
33-
auto out_array = &b;
3432

3533
auto mdspan_stencil_op = [](auto &&v) {
3634
auto [in, out] = v;
3735
out(0, 0) = (in(-1, 0) + in(0, -1) + in(0, 0) + in(0, 1) + in(1, 0)) / 4;
3836
};
3937

40-
mhp::halo(*in_array).exchange();
38+
mhp::halo(a).exchange();
4139
mhp::stencil_for_each(mdspan_stencil_op, in, out);
4240

4341
if (mhp::rank() == 0) {

0 commit comments

Comments
 (0)