diff --git a/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_utils.h b/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_utils.h index f5275b501a..5f8450f0ee 100644 --- a/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_utils.h +++ b/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_utils.h @@ -522,6 +522,8 @@ struct __usm_or_buffer_accessor struct __result_and_scratch_storage_base { virtual ~__result_and_scratch_storage_base() = default; + template + virtual _T __wait_and_get_value(_Event&&, size_t) const = 0; }; template @@ -683,7 +685,7 @@ struct __result_and_scratch_storage : __result_and_scratch_storage_base } template - _T + virtual _T __wait_and_get_value(_Event&& __event, size_t idx = 0) const { if (is_USM()) @@ -729,6 +731,13 @@ class __future : private std::tuple<_Args...> return __storage.__wait_and_get_value(__my_event); } + template + constexpr auto + __wait_and_get_value(const std::shared_ptr<__result_and_scratch_storage_base>& __storage) + { + return __storage.__wait_and_get_value(__my_event); + } + template constexpr auto __wait_and_get_value(const _T& __val)