Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated id -> range conversion #886

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions tests/hierarchical/hierarchical_non_uniform_local_range.cpp
Expand Up @@ -92,9 +92,12 @@ template <int dim> void check_dim(util::logger &log) {
local_range_total>(local_range, local_range);
cgh.parallel_for_work_group<kernel<dim>>(
groupRange, localRange, [=](sycl::group<dim> group_pid) {
sycl::range<dim> r;
auto group_id = group_pid.get_group_id();
for (int i = 0; i < dim; ++i) r[i] = group_id[i];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the other hand having to write this ugly code means we missed our goals somewhere.
Perhaps for SYCL Next exposing a range interface for id and an explicit constructor from a range to a range would make it better?


group_pid.parallel_for_work_item(
sycl::range<dim>(group_pid.get_id()),
[&](sycl::h_item<dim> item_id) {
r, [&](sycl::h_item<dim> item_id) {
unsigned physical_local_d1 =
item_id.get_physical_local()[0];
unsigned physical_local_d2 =
Expand Down