From 4bce6c96d0c49161b840796b277baab7972c0214 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Sun, 12 Oct 2025 15:42:56 +0200 Subject: Fixed and added Array for sycl --- modules/remote-sycl/c++/data.hpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 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 7763952..91f74f8 100644 --- a/modules/remote-sycl/c++/data.hpp +++ b/modules/remote-sycl/c++/data.hpp @@ -41,4 +41,40 @@ public: return data_.template get_access(h); } }; + +template +class data, encode::Sycl> { +public: + using Schema = schema::Array; +private: + cl::sycl::buffer> data_; + data size_; +public: + data(const data& host_data__): + data_{&host_data__.at({0u}),host_data__.size().get()}, + size_{host_data__.size()} + {} + + auto& get_handle() { + return data_; + } + + const auto& get_handle() const { + return data_; + } + + data size() const { + return size_; + } + + template + auto access(cl::sycl::handler& h){ + return data_.template get_access(h); + } + + template + auto access(cl::sycl::handler& h) const { + return data_.template get_access(h); + } +}; } -- cgit v1.2.3