File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
sycl/include/sycl/ext/oneapi/experimental Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ class work_group_memory_impl {
3636} // namespace detail
3737namespace ext ::oneapi::experimental {
3838
39+ struct indeterminate_t {};
40+ inline constexpr indeterminate_t indeterminate;
41+
3942template <typename DataT, typename PropertyListT = empty_properties_t >
4043class __SYCL_SPECIAL_CLASS __SYCL_TYPE (work_group_memory) work_group_memory
4144 : sycl::detail::work_group_memory_impl {
@@ -47,7 +50,13 @@ class __SYCL_SPECIAL_CLASS __SYCL_TYPE(work_group_memory) work_group_memory
4750 value_type, access::address_space::local_space>::type *;
4851
4952public:
50- work_group_memory () = default ;
53+ // Frontend requries special types to have a default constructor in device
54+ // compilation mode in order to have a uniform way of initializing an object of
55+ // special type to then call the __init method on it. This is purely an
56+ // implementation detail and not part of the spec.
57+ #ifdef __SYCL_DEVICE_ONLY__
58+ work_group_memory (const indeterminate_t &);
59+ #endif
5160 work_group_memory (const work_group_memory &rhs) = default ;
5261 work_group_memory &operator =(const work_group_memory &rhs) = default ;
5362 template <typename T = DataT,
You can’t perform that action at this time.
0 commit comments