From 7f230b02b106029351480f2f201b95235b516e5d Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Wed, 26 Jun 2024 14:43:38 +0200 Subject: Fixed the double free :) --- modules/remote-sycl/c++/device.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/remote-sycl/c++/device.hpp') diff --git a/modules/remote-sycl/c++/device.hpp b/modules/remote-sycl/c++/device.hpp index 5e63a1d..e6f3fe3 100644 --- a/modules/remote-sycl/c++/device.hpp +++ b/modules/remote-sycl/c++/device.hpp @@ -29,13 +29,16 @@ public: */ template error_or> copy_to_host(data& dev_data){ + /** data host_data; cmd_queue_.submit([&](cl::sycl::handler& h){ auto acc_buff = dev_data.template access(h); h.copy(acc_buff, &host_data); }); cmd_queue_.wait(); - return host_data; + */ + cl::sycl::host_accessor result{dev_data.get_handle()}; + return result[0]; } /** -- cgit v1.2.3