From eda37df9c399b23dc5bdb668730101a87f4770ce Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Wed, 26 Jun 2024 12:30:30 +0200 Subject: Attempting to fix async errors --- modules/remote-sycl/c++/transfer.hpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'modules/remote-sycl/c++/transfer.hpp') diff --git a/modules/remote-sycl/c++/transfer.hpp b/modules/remote-sycl/c++/transfer.hpp index 65a9b9e..8987de9 100644 --- a/modules/remote-sycl/c++/transfer.hpp +++ b/modules/remote-sycl/c++/transfer.hpp @@ -45,7 +45,7 @@ public: */ template error_or send(const data& dat, id store_id){ - auto& vals = std::get(values_); + auto& vals = std::get>>(values_); auto eoval = device_->template copy_to_device(dat); if(eoval.is_error()){ auto& err = eoval.get_error(); @@ -68,14 +68,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_->copy_to_host(dat); + auto eoval = device_->template copy_to_host(dat); return eoval; } @@ -153,7 +153,14 @@ public: */ template conveyor> receive(id dat_id){ - return srv_->receive(dat_id); + auto eov = srv_->receive(dat_id); + if(eov.is_error()){ + auto& err = eov.get_error(); + return std::move(err); + } + + auto& val = eov.get_value(); + return std::move(val); } /** -- cgit v1.2.3