Skip to content

Commit e9d9df1

Browse files
committed
Add a vector catch-all specialization to cast
1 parent e9061fd commit e9d9df1

File tree

1 file changed

+8
-0
lines changed
  • sycl/include/CL/sycl/detail

1 file changed

+8
-0
lines changed

sycl/include/CL/sycl/detail/pi.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,14 @@ template <class To, class From> inline To cast(From value) {
423423
return (To)(value);
424424
}
425425

426+
template <class To, class From> inline To cast(std::vector<From> value) {
427+
RT::assertion(false,
428+
"Compatibility specialization, not expected to be used. "
429+
"The only allowed cast using a vector of From values is "
430+
"implemented in the OpenCL backend (see cl_event case).");
431+
return {};
432+
}
433+
426434
#ifdef PI_OPENCL_AVAILABLE
427435

428436
// Cast for std::vector<cl_event>, according to the spec, make_event

0 commit comments

Comments
 (0)