From 25e05907f0292310eaae27a032db0ee274413874 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 2 Jul 2024 19:46:02 +0200 Subject: Preparing benchmark work --- modules/remote-sycl/c++/data.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'modules/remote-sycl/c++/data.hpp') 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 class data { private: cl::sycl::buffer> data_; + uint64_t size_; public: data(const data& 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 auto access(cl::sycl::handler& h){ return data_.template get_access(h); -- cgit v1.2.3