Skip to content

Commit

Permalink
+ virtual _T __wait_and_get_value(_Event&&, size_t) const = 0;
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeDvorskiy committed Dec 27, 2024
1 parent 19f0df8 commit ee70478
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,8 @@ struct __usm_or_buffer_accessor
struct __result_and_scratch_storage_base
{
virtual ~__result_and_scratch_storage_base() = default;
template <typename _Event>
virtual _T __wait_and_get_value(_Event&&, size_t) const = 0;
};

template <typename _ExecutionPolicy, typename _T>
Expand Down Expand Up @@ -683,7 +685,7 @@ struct __result_and_scratch_storage : __result_and_scratch_storage_base
}

template <typename _Event>
_T
virtual _T
__wait_and_get_value(_Event&& __event, size_t idx = 0) const
{
if (is_USM())
Expand Down Expand Up @@ -729,6 +731,13 @@ class __future : private std::tuple<_Args...>
return __storage.__wait_and_get_value(__my_event);
}

template <typename _ExecutionPolicy, typename _T>
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 <typename _T>
constexpr auto
__wait_and_get_value(const _T& __val)
Expand Down

0 comments on commit ee70478

Please sign in to comment.