Skip to content

Commit e13afe9

Browse files
committed
small review fixes
removed ifdef, added a comment describing the example
1 parent 8600d54 commit e13afe9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/example6.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ namespace mhp = dr::mhp;
1010
using T = uint16_t;
1111
using MDA = dr::mhp::distributed_mdarray<T, 2>;
1212

13+
/* 2D pattern search in a distributed multidimensional (2D) array */
1314
int main() {
14-
#ifdef SYCL_LANGUAGE_VERSION
1515
mhp::init(sycl::default_selector_v);
16-
#else
17-
mhp::init();
18-
#endif
16+
1917
std::size_t arr_size = 7;
2018
const std::size_t pattern_size = 2;
2119
const std::size_t radius = pattern_size - 1;
@@ -42,7 +40,7 @@ int main() {
4240
pattern[0][1] == a_submdspan(0, 1) &&
4341
pattern[1][0] == a_submdspan(1, 0) &&
4442
pattern[1][1] == a_submdspan(1, 1)) {
45-
occurrences(0, 0)++;
43+
occurrences(0, 0) = 1;
4644
}
4745
};
4846

0 commit comments

Comments
 (0)