File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,16 @@ class usm_allocator {
5050 : MContext(Q.get_context()), MDevice(Q.get_device()) {}
5151 usm_allocator (const usm_allocator &) noexcept = default ;
5252 usm_allocator (usm_allocator &&) noexcept = default ;
53- usm_allocator &operator =(const usm_allocator &) = delete ;
54- usm_allocator &operator =(usm_allocator &&) = default ;
53+ usm_allocator &operator =(const usm_allocator &Other) {
54+ MContext = Other.MContext ;
55+ MDevice = Other.MDevice ;
56+ return *this ;
57+ }
58+ usm_allocator &operator =(usm_allocator &&Other) {
59+ MContext = std::move (Other.MContext );
60+ MDevice = std::move (Other.MDevice );
61+ return *this ;
62+ }
5563
5664 template <class U >
5765 usm_allocator (const usm_allocator<U, AllocKind, Alignment> &Other) noexcept
@@ -101,8 +109,8 @@ class usm_allocator {
101109 template <class U , usm::alloc AllocKindU, size_t AlignmentU>
102110 friend class usm_allocator ;
103111
104- const context MContext;
105- const device MDevice;
112+ context MContext;
113+ device MDevice;
106114};
107115
108116} // namespace sycl
You can’t perform that action at this time.
0 commit comments