summaryrefslogtreecommitdiff
path: root/modules/remote-sycl
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2024-07-05 16:50:33 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2024-07-05 16:50:33 +0200
commit614d0bf07789457a97d194c4af9cc7393f871351 (patch)
treefffe8f702589603b397497e14ca217428c98edec /modules/remote-sycl
parent9f320474f1c19861d46f6c42a09f7bba9dc919bc (diff)
Working on loopback data transmission
Diffstat (limited to 'modules/remote-sycl')
-rw-r--r--modules/remote-sycl/c++/transfer.hpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/modules/remote-sycl/c++/transfer.hpp b/modules/remote-sycl/c++/transfer.hpp
index 72b111f..2a95f67 100644
--- a/modules/remote-sycl/c++/transfer.hpp
+++ b/modules/remote-sycl/c++/transfer.hpp
@@ -9,17 +9,6 @@
#include <forstio/codec/transfer.hpp>
namespace saw {
-namespace impl {
-template<typename Encoding, typename T>
-struct data_server_redux {
- using type = std::tuple<>;
-};
-
-template<typename Encoding, typename... Schema>
-struct data_server_redux<Encoding, tmpl_group<Schema...>> {
- using type = std::tuple<std::unordered_map<uint64_t, data<Schema, Encoding, rmt::Sycl>>...>;
-};
-}
template<typename... Schema, typename Encoding>
class data_server<tmpl_group<Schema...>, Encoding, rmt::Sycl> {
@@ -32,7 +21,7 @@ private:
/**
* Store for the data the server manages.
*/
- typename impl::data_server_redux<Encoding, typename tmpl_reduce<tmpl_group<Schema...>>::type >::type values_;
+ typename impl::data_server_redux<Encoding, rmt::Sycl, typename tmpl_reduce<tmpl_group<Schema...>>::type >::type values_;
public:
/**
* Main constructor
@@ -85,7 +74,7 @@ public:
*/
template<typename Sch>
error_or<void> erase(id<Sch> store_id){
- auto& vals = std::get<Sch>(values_);
+ auto& vals = std::get<std::unordered_map<uint64_t, data<Sch,Encoding,rmt::Sycl>>>(values_);
auto erase_op = vals.erase(store_id.get_value());
if(erase_op == 0u){
return make_error<err::not_found>();
@@ -99,7 +88,7 @@ public:
*/
template<typename Sch>
error_or<data<Sch, Encoding, rmt::Sycl>*> find(id<Sch> store_id){
- auto& vals = std::get<Sch>(values_);
+ auto& vals = std::get<std::unordered_map<uint64_t, data<Sch,Encoding,rmt::Sycl>>>(values_);
auto find_res = vals.find(store_id.get_value());
if(find_res == vals.end()){
return make_error<err::not_found>();