diff options
Diffstat (limited to 'modules/remote-sycl/c++/data.hpp')
-rw-r--r-- | modules/remote-sycl/c++/data.hpp | 23 |
1 files changed, 23 insertions, 0 deletions
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<typename Schema> +class data<Schema, encode::Native, rmt::Sycl> { +private: + cl::sycl::buffer<data<Schema, encode::Native, storage::Default>> data_; +public: + data(data<Schema, encode::Native, storage::Default>& data__): + data_{&data__, 1u} + {} + + auto& get_handle() { + return data_; + } + + template<cl::sycl::access::mode AccessMode> + auto access(cl::sycl::handler& h){ + return data_.template get_access<AccessMode>(h); + } +}; + } |