Skip to content

Commit 3d79ef9

Browse files
Merge pull request #900 from IntelPython/improve-queue-compatibility-testing
Improve queue compatibility testing
2 parents fd942cd + 74f0b37 commit 3d79ef9

File tree

3 files changed

+130
-172
lines changed

3 files changed

+130
-172
lines changed

dpctl/apis/include/dpctl4pybind11.hpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,19 @@ sycl::event keep_args_alive(sycl::queue q,
547547
return host_task_ev;
548548
}
549549

550+
template <std::size_t num>
551+
bool queues_are_compatible(sycl::queue exec_q,
552+
const sycl::queue (&alloc_qs)[num])
553+
{
554+
for (std::size_t i = 0; i < num; ++i) {
555+
556+
if (exec_q != alloc_qs[i]) {
557+
return false;
558+
}
559+
}
560+
return true;
561+
}
562+
550563
} // end namespace utils
551564

552565
} // end namespace dpctl

0 commit comments

Comments
 (0)