From 5202f24921e2136b284eadb54783519fb38967a3 Mon Sep 17 00:00:00 2001 From: Claudius 'keldu' Holeksa Date: Wed, 21 Aug 2024 17:22:17 +0200 Subject: Trying to fix the old storage approach --- modules/remote-sycl/c++/rpc.hpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'modules/remote-sycl/c++/rpc.hpp') diff --git a/modules/remote-sycl/c++/rpc.hpp b/modules/remote-sycl/c++/rpc.hpp index 780f7a0..65e2df5 100644 --- a/modules/remote-sycl/c++/rpc.hpp +++ b/modules/remote-sycl/c++/rpc.hpp @@ -118,14 +118,14 @@ struct rpc_iface_type_helper,schema::Me /** * Rpc Client class for the Sycl backend. */ -template -class rpc_client { +template +class rpc_client { public: private: /** * Server this client is tied to */ - rpc_server* srv_; + rpc_server* srv_; /** * TransferClient created from the internal RPC data server @@ -136,7 +136,7 @@ private: * Generated some sort of id for the request. */ public: - rpc_client(rpc_server& srv): + rpc_client(rpc_server& srv): srv_{&srv}, data_client_{srv_->data_server} {} @@ -149,7 +149,7 @@ public: id< typename schema_member_type::type::ResponseT > - > call(const data_or_id::type::RequestT, Encoding, Storage>& input){ + > call(const data_or_id::type::RequestT, Encoding>& input){ auto next_free_id = srv_->template next_free_id::type::ResponseT>(); return srv_->template call(input, next_free_id); } @@ -160,10 +160,10 @@ public: * Rpc Server class for the Sycl backend. */ template -class rpc_server { +class rpc_server { public: using InterfaceCtxT = cl::sycl::queue*; - using InterfaceT = interface; + using InterfaceT = interface, InterfaceCtxT>; private: /** @@ -218,18 +218,18 @@ public: id< typename schema_member_type::type::ResponseT > - > call(data_or_id::type::RequestT, Encoding, storage::Default> input, id::type::ResponseT> rpc_id){ + > call(data_or_id::type::RequestT, Encoding> input, id::type::ResponseT> rpc_id){ using FuncT = typename schema_member_type::type; /** * Object needed if and only if the provided data type is not an id */ - own> dev_tmp_inp = nullptr; + own>> dev_tmp_inp = nullptr; /** * First check if it's data or an id. * If it's an id, check if it's registered within the storage and retrieve it. */ - auto eoinp = [&,this]() -> error_or* > { + auto eoinp = [&,this]() -> error_or>* > { if(input.is_id()){ // storage_.maps auto eov = data_server_->template find(input.get_id()); @@ -246,7 +246,7 @@ public: } auto& val = eov.get_value(); - dev_tmp_inp = heap>(std::move(val)); + dev_tmp_inp = heap>>(std::move(val)); device_->get_handle().wait(); return dev_tmp_inp.get(); } -- cgit v1.2.3