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 {
50
50
: MContext(Q.get_context()), MDevice(Q.get_device()) {}
51
51
usm_allocator (const usm_allocator &) noexcept = default ;
52
52
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
+ }
55
63
56
64
template <class U >
57
65
usm_allocator (const usm_allocator<U, AllocKind, Alignment> &Other) noexcept
@@ -101,8 +109,8 @@ class usm_allocator {
101
109
template <class U , usm::alloc AllocKindU, size_t AlignmentU>
102
110
friend class usm_allocator ;
103
111
104
- const context MContext;
105
- const device MDevice;
112
+ context MContext;
113
+ device MDevice;
106
114
};
107
115
108
116
} // namespace sycl
You can’t perform that action at this time.
0 commit comments