Skip to content

Improve queue compatibility testing #900

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

Merged
merged 8 commits into from
Sep 9, 2022
13 changes: 13 additions & 0 deletions dpctl/apis/include/dpctl4pybind11.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,19 @@ sycl::event keep_args_alive(sycl::queue q,
return host_task_ev;
}

template <std::size_t num>
bool queues_are_compatible(sycl::queue exec_q,
const sycl::queue (&alloc_qs)[num])
{
for (std::size_t i = 0; i < num; ++i) {

if (exec_q != alloc_qs[i]) {
return false;
}
}
return true;
}

} // end namespace utils

} // end namespace dpctl
Loading