From a1583da62ea0f7e9affe868cd509557b5e91fae3 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Sat, 30 Aug 2025 19:02:15 +0200 Subject: Fixing sycl --- modules/remote-sycl/c++/remote.hpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'modules/remote-sycl/c++/remote.hpp') diff --git a/modules/remote-sycl/c++/remote.hpp b/modules/remote-sycl/c++/remote.hpp index a481740..fd2f64a 100644 --- a/modules/remote-sycl/c++/remote.hpp +++ b/modules/remote-sycl/c++/remote.hpp @@ -28,19 +28,21 @@ private: SAW_FORBID_MOVE(remote); struct key_t { - uint64_t device_id; - uint32_t sch_id; - uint32_t enc_id; - + std::array data; + + template + static key_t create(const remote_address& addr){ + key_t k; + k.data = std::array{addr.get_address_id().get(), schema_hash::apply(), schema_hash::apply()}; + + return k; + } + bool operator<(const key_t& rhs) const { - if(device_id != rhs.device_id){ - return device_id < rhs.device_id; - } - if(sch_id != rhs.sch_id){ - return sch_id < rhs.sch_id; - } - if(enc_id != rhs.enc_id){ - return enc_id < rhs.enc_id; + for(uint64_t i = 0u; i < 3; ++i){ + if(data[i] != rhs.data[i]){ + return data[i] < rhs.data[i]; + } } return false; } -- cgit v1.2.3