Skip to content

Commit d3e5273

Browse files
authored
[SYCL] Fix accessor::swap() method (#7201)
Need to swap new member MAccData (added in 01e60f7) in addition to Impl.
1 parent 490ee55 commit d3e5273

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sycl/include/sycl/accessor.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1949,7 +1949,12 @@ class __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
19491949
#endif
19501950
}
19511951

1952-
void swap(accessor &other) { std::swap(impl, other.impl); }
1952+
void swap(accessor &other) {
1953+
std::swap(impl, other.impl);
1954+
#ifndef __SYCL_DEVICE_ONLY__
1955+
std::swap(MAccData, other.MAccData);
1956+
#endif
1957+
}
19531958

19541959
constexpr bool is_placeholder() const { return IsPlaceH; }
19551960

0 commit comments

Comments
 (0)