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++/common.hpp | 7 +------ modules/remote-sycl/c++/data.hpp | 8 +++++++- modules/remote-sycl/c++/device.hpp | 4 +++- modules/remote-sycl/c++/transfer.hpp | 3 ++- 4 files changed, 13 insertions(+), 9 deletions(-) (limited to 'modules/remote-sycl/c++') 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 +#include #include #include @@ -17,9 +17,4 @@ class remote; template class device; -template -class data_server; - -template -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 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); 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 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 #include +#include namespace saw { namespace impl { @@ -31,7 +32,7 @@ private: /** * Store for the data the server manages. */ - impl::data_server_redux>::type >::type values_; + typename impl::data_server_redux>::type >::type values_; public: /** * Main constructor -- cgit v1.2.3