diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-07-02 19:46:02 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-07-02 19:46:02 +0200 |
commit | 25e05907f0292310eaae27a032db0ee274413874 (patch) | |
tree | 283de0ebb6b61add2221436a77bb09e2ff101080 /modules/remote-sycl/c++/data.hpp | |
parent | e51d2b1c0493dfd30d1622c8a0628ecf98c92f1c (diff) |
Preparing benchmark work
Diffstat (limited to 'modules/remote-sycl/c++/data.hpp')
-rw-r--r-- | modules/remote-sycl/c++/data.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/remote-sycl/c++/data.hpp b/modules/remote-sycl/c++/data.hpp index e436e72..d939a53 100644 --- a/modules/remote-sycl/c++/data.hpp +++ b/modules/remote-sycl/c++/data.hpp @@ -12,9 +12,11 @@ template<typename Schema> class data<Schema, encode::Native, rmt::Sycl> { private: cl::sycl::buffer<data<Schema, encode::Native, storage::Default>> data_; + uint64_t size_; public: data(const data<Schema, encode::Native, storage::Default>& data__): - data_{&data__, 1u} + data_{&data__, 1u}, + size_{data__.size()} {} auto& get_handle() { @@ -25,6 +27,10 @@ public: return data_; } + uint64_t size() const { + return size_; + } + template<cl::sycl::access::mode AccessMode> auto access(cl::sycl::handler& h){ return data_.template get_access<AccessMode>(h); |