Skip to content

Commit

Permalink
Improve error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
al42and authored and fknorr committed Dec 19, 2024
1 parent 5f17393 commit 30cbaad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/simsycl/queue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ struct queue_state {

queue_state(const sycl::device &device, const sycl::context &context, const sycl::async_handler &async_handler)
: device(device), context(context), async_handler(async_handler) {
const auto devices = context.get_devices();
SIMSYCL_CHECK_MSG(std::find(devices.begin(), devices.end(), device) != devices.end(),
SIMSYCL_CHECK_MSG(
[ds = context.get_devices()](auto &d) { return std::find(ds.begin(), ds.end(), d) != ds.end(); }(device),
"queue::queue(): selected device is not in provided context");
}

Expand Down

0 comments on commit 30cbaad

Please sign in to comment.