diff options
Diffstat (limited to 'modules/remote-sycl/c++')
-rw-r--r-- | modules/remote-sycl/c++/common.hpp | 7 | ||||
-rw-r--r-- | modules/remote-sycl/c++/data.hpp | 8 | ||||
-rw-r--r-- | modules/remote-sycl/c++/device.hpp | 4 | ||||
-rw-r--r-- | modules/remote-sycl/c++/transfer.hpp | 3 |
4 files changed, 13 insertions, 9 deletions
diff --git a/modules/remote-sycl/c++/common.hpp b/modules/remote-sycl/c++/common.hpp index 9bc734d..078879f 100644 --- a/modules/remote-sycl/c++/common.hpp +++ b/modules/remote-sycl/c++/common.hpp @@ -1,6 +1,6 @@ #pragma once -#include <forstio/io_codec/rpc.hpp> +#include <forstio/codec/rpc.hpp> #include <forstio/codec/data.hpp> #include <forstio/codec/id_map.hpp> @@ -17,9 +17,4 @@ class remote<rmt::Sycl>; template<typename T> class device; -template<typename Schema, typename Encoding, typename Remote> -class data_server; - -template<typename Schema, typename Encoding, typename Remote> -class data_client; } 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); diff --git a/modules/remote-sycl/c++/device.hpp b/modules/remote-sycl/c++/device.hpp index e6f3fe3..ae19524 100644 --- a/modules/remote-sycl/c++/device.hpp +++ b/modules/remote-sycl/c++/device.hpp @@ -11,7 +11,9 @@ class device<rmt::Sycl> final { private: cl::sycl::queue cmd_queue_; public: - device() = default; + device(): + cmd_queue_{cl::sycl::default_selector_v, cl::sycl::property_list{cl::sycl::property::queue::enable_profiling()}} + {} SAW_FORBID_COPY(device); SAW_FORBID_MOVE(device); diff --git a/modules/remote-sycl/c++/transfer.hpp b/modules/remote-sycl/c++/transfer.hpp index f535751..72b111f 100644 --- a/modules/remote-sycl/c++/transfer.hpp +++ b/modules/remote-sycl/c++/transfer.hpp @@ -6,6 +6,7 @@ #include <forstio/error.hpp> #include <forstio/reduce_templates.hpp> +#include <forstio/codec/transfer.hpp> namespace saw { namespace impl { @@ -31,7 +32,7 @@ private: /** * Store for the data the server manages. */ - impl::data_server_redux<Encoding, typename tmpl_reduce<tmpl_group<Schema...>>::type >::type values_; + typename impl::data_server_redux<Encoding, typename tmpl_reduce<tmpl_group<Schema...>>::type >::type values_; public: /** * Main constructor |