diff options
author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-08-21 17:22:17 +0200 |
---|---|---|
committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-08-21 17:22:17 +0200 |
commit | 5202f24921e2136b284eadb54783519fb38967a3 (patch) | |
tree | 27c44269824264237be046c02019d71d48245243 /modules/remote-sycl/c++/rpc.hpp | |
parent | b7a6d768230edd4e85e08596955308cd4a39722e (diff) |
Trying to fix the old storage approach
Diffstat (limited to 'modules/remote-sycl/c++/rpc.hpp')
-rw-r--r-- | modules/remote-sycl/c++/rpc.hpp | 22 |
1 files changed, 11 insertions, 11 deletions
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::Interface<schema::Member<Func,K>,schema::Me /** * Rpc Client class for the Sycl backend. */ -template<typename Iface, typename Encoding, typename Storage> -class rpc_client<Iface, Encoding, Storage, rmt::Sycl> { +template<typename Iface, typename Encoding> +class rpc_client<Iface, Encoding, rmt::Sycl> { public: private: /** * Server this client is tied to */ - rpc_server<Iface, Encoding, Storage, rmt::Sycl>* srv_; + rpc_server<Iface, Encoding, rmt::Sycl>* 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<Iface, Encoding, Storage, rmt::Sycl>& srv): + rpc_client(rpc_server<Iface, Encoding, rmt::Sycl>& srv): srv_{&srv}, data_client_{srv_->data_server} {} @@ -149,7 +149,7 @@ public: id< typename schema_member_type<Name, Iface>::type::ResponseT > - > call(const data_or_id<typename schema_member_type<Name, Iface>::type::RequestT, Encoding, Storage>& input){ + > call(const data_or_id<typename schema_member_type<Name, Iface>::type::RequestT, Encoding>& input){ auto next_free_id = srv_->template next_free_id<typename schema_member_type<Name, Iface>::type::ResponseT>(); return srv_->template call<Name, Storage>(input, next_free_id); } @@ -160,10 +160,10 @@ public: * Rpc Server class for the Sycl backend. */ template<typename Iface, typename Encoding> -class rpc_server<Iface, Encoding, storage::Default, rmt::Sycl> { +class rpc_server<Iface, Encoding, rmt::Sycl> { public: using InterfaceCtxT = cl::sycl::queue*; - using InterfaceT = interface<Iface, Encoding, storage::Default, InterfaceCtxT>; + using InterfaceT = interface<Iface, encode::Sycl<Encoding>, InterfaceCtxT>; private: /** @@ -218,18 +218,18 @@ public: id< typename schema_member_type<Name, Iface>::type::ResponseT > - > call(data_or_id<typename schema_member_type<Name, Iface>::type::RequestT, Encoding, storage::Default> input, id<typename schema_member_type<Name,Iface>::type::ResponseT> rpc_id){ + > call(data_or_id<typename schema_member_type<Name, Iface>::type::RequestT, Encoding> input, id<typename schema_member_type<Name,Iface>::type::ResponseT> rpc_id){ using FuncT = typename schema_member_type<Name, Iface>::type; /** * Object needed if and only if the provided data type is not an id */ - own<data<typename FuncT::RequestT, Encoding, rmt::Sycl>> dev_tmp_inp = nullptr; + own<data<typename FuncT::RequestT, encode::Sycl<Encoding>>> 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<data<typename FuncT::RequestT, Encoding, rmt::Sycl>* > { + auto eoinp = [&,this]() -> error_or<data<typename FuncT::RequestT, encode::Sycl<Encoding>>* > { if(input.is_id()){ // storage_.maps auto eov = data_server_->template find<typename FuncT::RequestT>(input.get_id()); @@ -246,7 +246,7 @@ public: } auto& val = eov.get_value(); - dev_tmp_inp = heap<data<typename FuncT::RequestT, Encoding, rmt::Sycl>>(std::move(val)); + dev_tmp_inp = heap<data<typename FuncT::RequestT, encode::Sycl<Encoding>>>(std::move(val)); device_->get_handle().wait(); return dev_tmp_inp.get(); } |