File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1676,6 +1676,8 @@ class __SYCL_SPECIAL_CLASS accessor :
1676
1676
#endif
1677
1677
}
1678
1678
1679
+ void swap (accessor &other) { std::swap (impl, other.impl ); }
1680
+
1679
1681
constexpr bool is_placeholder () const { return IsPlaceH; }
1680
1682
1681
1683
size_t get_size () const { return getAccessRange ().size () * sizeof (DataT); }
@@ -1684,6 +1686,12 @@ class __SYCL_SPECIAL_CLASS accessor :
1684
1686
size_t get_count () const { return size (); }
1685
1687
size_t size () const noexcept { return getAccessRange ().size (); }
1686
1688
1689
+ size_t byte_size () const noexcept { return size () * sizeof (DataT); }
1690
+
1691
+ size_t max_size () const noexcept { return std::vector<DataT>().max_size (); }
1692
+
1693
+ bool empty () const noexcept { return size () == 0 ; }
1694
+
1687
1695
template <int Dims = Dimensions, typename = detail::enable_if_t <(Dims > 0 )>>
1688
1696
range<Dimensions> get_range () const {
1689
1697
return detail::convertToArrayOfN<Dimensions, 1 >(getAccessRange ());
@@ -2343,6 +2351,15 @@ class __SYCL_SPECIAL_CLASS local_accessor
2343
2351
}
2344
2352
2345
2353
#endif
2354
+
2355
+ public:
2356
+ void swap (local_accessor &other) { std::swap (this ->impl , other.impl ); }
2357
+
2358
+ size_t byte_size () const noexcept { return this ->size () * sizeof (DataT); }
2359
+
2360
+ size_t max_size () const noexcept { return std::vector<DataT>().max_size (); }
2361
+
2362
+ bool empty () const noexcept { return this ->size () == 0 ; }
2346
2363
};
2347
2364
2348
2365
// / Image accessors.
You can’t perform that action at this time.
0 commit comments