From 729307460e77f62a532ee9841dcaed9c47f46419 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Wed, 26 Jun 2024 09:39:34 +0200 Subject: Added better structure for the data server --- modules/remote-sycl/c++/data.hpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (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 7ecf1ae..3ad1d9c 100644 --- a/modules/remote-sycl/c++/data.hpp +++ b/modules/remote-sycl/c++/data.hpp @@ -4,4 +4,27 @@ namespace saw { +/** + * Generic wrapper class which stores data on the sycl side. + * Most of the times this will be a root object. + */ +template +class data { +private: + cl::sycl::buffer> data_; +public: + data(data& data__): + data_{&data__, 1u} + {} + + auto& get_handle() { + return data_; + } + + template + auto access(cl::sycl::handler& h){ + return data_.template get_access(h); + } +}; + } -- cgit v1.2.3