From 4fdfa202eef2419a9f043cd45a3075d6b5e3063f Mon Sep 17 00:00:00 2001 From: Claudius 'keldu' Holeksa Date: Wed, 21 Aug 2024 18:01:16 +0200 Subject: Pulling out Storage template --- modules/remote-sycl/c++/rpc.hpp | 4 ++-- modules/remote-sycl/c++/transfer.hpp | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'modules/remote-sycl/c++') diff --git a/modules/remote-sycl/c++/rpc.hpp b/modules/remote-sycl/c++/rpc.hpp index 65e2df5..da2eeaa 100644 --- a/modules/remote-sycl/c++/rpc.hpp +++ b/modules/remote-sycl/c++/rpc.hpp @@ -10,8 +10,8 @@ namespace saw { /** * Remote data class for the Sycl backend. */ -template -class remote_data final { +template +class remote_data final { private: /** * An identifier to the data being held on the remote diff --git a/modules/remote-sycl/c++/transfer.hpp b/modules/remote-sycl/c++/transfer.hpp index a7f1b53..e39165b 100644 --- a/modules/remote-sycl/c++/transfer.hpp +++ b/modules/remote-sycl/c++/transfer.hpp @@ -88,9 +88,9 @@ public: * Get data which we will store. */ template - error_or send(const data& dat, id store_id){ + error_or send(const data& dat, id store_id){ auto& vals = std::get>>(values_); - auto eoval = device_->template copy_to_device(dat); + auto eoval = device_->template copy_to_device(dat); if(eoval.is_error()){ auto& err = eoval.get_error(); return std::move(err); @@ -108,9 +108,9 @@ public: } template - error_or allocate(const data::MetaSchema, Encoding, storage::Default>& dat, id store_id){ - auto& vals = std::get>>(values_); - auto eoval = device_->template allocate_on_device(dat); + error_or allocate(const data::MetaSchema, Encoding>& dat, id store_id){ + auto& vals = std::get>>>(values_); + auto eoval = device_->template allocate_on_device(dat); if(eoval.is_error()){ auto& err = eoval.get_error(); return std::move(err); @@ -132,14 +132,14 @@ public: */ template error_or> receive(id store_id){ - auto& vals = std::get>>(values_); + auto& vals = std::get>>>(values_); auto find_res = vals.find(store_id.get_value()); if(find_res == vals.end()){ return make_error(); } auto& dat = find_res->second; - auto eoval = device_->template copy_to_host(dat); + auto eoval = device_->template copy_to_host(dat); return eoval; } @@ -148,7 +148,7 @@ public: */ template error_or erase(id store_id){ - auto& vals = std::get>>(values_); + auto& vals = std::get>>(values_); auto erase_op = vals.erase(store_id.get_value()); if(erase_op == 0u){ return make_error(); @@ -161,8 +161,8 @@ public: * Insert operations may invalidate the pointer. */ template - error_or*> find(id store_id){ - auto& vals = std::get>>(values_); + error_or>*> find(id store_id){ + auto& vals = std::get>>(values_); auto find_res = vals.find(store_id.get_value()); if(find_res == vals.end()){ return make_error(); @@ -200,7 +200,7 @@ public: * Send data to the remote. */ template - error_or> send(const data& dat){ + error_or> send(const data& dat){ id dat_id{next_id_}; auto eov = srv_->send(dat, dat_id); if(eov.is_error()){ @@ -216,7 +216,7 @@ public: * Receive data */ template - conveyor> receive(id dat_id){ + conveyor> receive(id dat_id){ auto eov = srv_->receive(dat_id); if(eov.is_error()){ auto& err = eov.get_error(); -- cgit v1.2.3