File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
doc/extensions/experimental
include/sycl/ext/oneapi/device_global
test/extensions/device_global Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -335,6 +335,19 @@ The object of type `T` is initialized from the `args` parameter pack using list
335335
336336`T` must be trivially destructible.
337337
338+ // --- ROW BREAK ---
339+ a|
340+ [source,c++]
341+ ----
342+ constexpr device_global(const device_global &other);
343+ ----
344+ |
345+ Available if `PropertyListT::has_property<device_image_scope_key>() == false`.
346+
347+ Constructs a `device_global` object, and implicit storage for `T` in the global address space on each device that may access it.
348+
349+ The storage on each device for `T` is initialized with a copy of the storage in `other`.
350+
338351// --- ROW BREAK ---
339352a|
340353[source,c++]
Original file line number Diff line number Diff line change @@ -226,6 +226,9 @@ class
226226 // Inherit the base class' constructors
227227 using detail::device_global_base<T, property_list_t >::device_global_base;
228228
229+ constexpr device_global (const device_global &DG)
230+ : base_t (static_cast <const base_t &>(DG)) {}
231+
229232 device_global (const device_global &&) = delete ;
230233 device_global &operator =(const device_global &) = delete ;
231234 device_global &operator =(const device_global &&) = delete ;
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ namespace oneapiext = sycl::ext::oneapi::experimental;
1010using device_image_properties =
1111 decltype (oneapiext::properties{oneapiext::device_image_scope});
1212
13- // expected-error@+2 {{call to implicitly- deleted copy constructor of }}
13+ // expected-error@sycl/ext/oneapi/device_global/device_global.hpp:* {{call to deleted constructor}}
1414oneapiext::device_global<const int , device_image_properties> DGInit1{3 };
1515oneapiext::device_global<const int , device_image_properties> DGCopy1{DGInit1};
1616
17- // expected-error@+2 {{call to implicitly- deleted copy constructor of }}
17+ // expected-error@sycl/ext/oneapi/device_global/device_global.hpp:* {{call to deleted constructor}}
1818oneapiext::device_global<int , device_image_properties> DGInit2{3 };
1919oneapiext::device_global<int , device_image_properties> DGCopy2{DGInit2};
2020
You can’t perform that action at this time.
0 commit comments