From 02e0554147004c6498d00cc88a1fa43e38e4ba3d Mon Sep 17 00:00:00 2001 From: Claudius 'keldu' Holeksa Date: Fri, 6 Sep 2024 19:42:05 +0200 Subject: wip --- modules/codec/c++/data_raw.hpp | 2 +- modules/codec/c++/schema.hpp | 4 ++++ modules/codec/tests/data_raw.cpp | 10 ++++++++++ modules/remote-hip/c++/transfer.hpp | 2 ++ 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 modules/codec/tests/data_raw.cpp diff --git a/modules/codec/c++/data_raw.hpp b/modules/codec/c++/data_raw.hpp index de5e7f0..88a0ee2 100644 --- a/modules/codec/c++/data_raw.hpp +++ b/modules/codec/c++/data_raw.hpp @@ -339,7 +339,7 @@ class data, encode::NativeRaw> { using DataType = std::conditional< is_primitive::value, - typename native_data_type::type + typename native_data_type::type >; private: // data> dims_; diff --git a/modules/codec/c++/schema.hpp b/modules/codec/c++/schema.hpp index 3820cf3..40dfe39 100644 --- a/modules/codec/c++/schema.hpp +++ b/modules/codec/c++/schema.hpp @@ -318,4 +318,8 @@ template struct is_array> { template struct is_primitive> { constexpr static bool value = true; }; + +template struct is_primitive> { + constexpr static bool value = true; +}; } // namespace saw diff --git a/modules/codec/tests/data_raw.cpp b/modules/codec/tests/data_raw.cpp new file mode 100644 index 0000000..99d55a8 --- /dev/null +++ b/modules/codec/tests/data_raw.cpp @@ -0,0 +1,10 @@ +#include +#include "../c++/data_raw.hpp" + +namespace { +namespace sch { +using namespace saw::schema; +} + + +} diff --git a/modules/remote-hip/c++/transfer.hpp b/modules/remote-hip/c++/transfer.hpp index 348d7fc..cdde8ba 100644 --- a/modules/remote-hip/c++/transfer.hpp +++ b/modules/remote-hip/c++/transfer.hpp @@ -29,11 +29,13 @@ public: {} error_or send(const data& dat, id store_id){ + auto ins = values_.emplace(std::make_pair(store_id.get_value(), data>{dat})); if(!ins.second){ return make_error(); } + return make_error("Allocate not implemented. Since we don't actually do any device copies."); return make_void(); } -- cgit v1.2.3