Skip to content

Commit 2223f8e

Browse files
committed
test with specialization
1 parent 1873789 commit 2223f8e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

sycl/source/detail/device_info.hpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,6 +1411,30 @@ typename Param::return_type get_device_info(const DeviceImplPtr &Dev) {
14111411
return get_device_info_impl<typename Param::return_type, Param>::get(Dev);
14121412
}
14131413

1414+
template <>
1415+
inline typename info::device::preferred_interop_user_sync::return_type
1416+
get_device_info<info::device::preferred_interop_user_sync>(const DeviceImplPtr &Dev){
1417+
if (Dev->getBackend() != backend::opencl){
1418+
throw sycl::exception(errc::backend_mismatch,
1419+
"the info::device::preferred_interop_user_sync info descriptor can "
1420+
"only be queried with an OpenCL backend");
1421+
}
1422+
using Param = info::device::preferred_interop_user_sync;
1423+
return get_device_info_impl<Param::return_type, Param>::get(Dev);
1424+
}
1425+
1426+
template <>
1427+
inline typename info::device::profile::return_type
1428+
get_device_info<info::device::profile>(const DeviceImplPtr &Dev){
1429+
if (Dev->getBackend() != backend::opencl){
1430+
throw sycl::exception(errc::backend_mismatch,
1431+
"the info::device::profile info descriptor can "
1432+
"only be queried with an OpenCL backend");
1433+
}
1434+
using Param = info::device::profile;
1435+
return get_device_info_impl<Param::return_type, Param>::get(Dev);
1436+
}
1437+
14141438
template <>
14151439
inline ext::intel::info::device::device_id::return_type
14161440
get_device_info<ext::intel::info::device::device_id>(const DeviceImplPtr &Dev) {

0 commit comments

Comments
 (0)