summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudius 'keldu' Holeksa <mail@keldu.de>2024-09-06 19:42:05 +0200
committerClaudius 'keldu' Holeksa <mail@keldu.de>2024-09-06 19:42:05 +0200
commit02e0554147004c6498d00cc88a1fa43e38e4ba3d (patch)
tree3bec12696a766ecc15f996e908442108e0be46be
parent95778fe686ddd3e6e29915cb50e4b07876a39904 (diff)
wip
-rw-r--r--modules/codec/c++/data_raw.hpp2
-rw-r--r--modules/codec/c++/schema.hpp4
-rw-r--r--modules/codec/tests/data_raw.cpp10
-rw-r--r--modules/remote-hip/c++/transfer.hpp2
4 files changed, 17 insertions, 1 deletions
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<schema::Array<T,Dim>, encode::NativeRaw> {
using DataType = std::conditional<
is_primitive<typename T>::value,
- typename native_data_type<T>::type
+ typename native_data_type<typename T::StorageSchema>::type
>;
private:
// data<schema::FixedArray<schema::UInt64, Dim>> 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 <class T, size_t Dim> struct is_array<schema::Array<T,Dim>> {
template <typename T, size_t N> struct is_primitive<schema::Primitive<T,N>> {
constexpr static bool value = true;
};
+
+template <typename TI, typename TS> struct is_primitive<schema::MixedPrecision<TI,TS>> {
+ 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 <forstio/test/suite.hpp>
+#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<void> send(const data<Schema,Encoding>& dat, id<Schema> store_id){
+
auto ins = values_.emplace(std::make_pair(store_id.get_value(), data<Schema, encode::Hip<Encoding>>{dat}));
if(!ins.second){
return make_error<err::already_exists>();
}
+ return make_error<err::not_implemented>("Allocate not implemented. Since we don't actually do any device copies.");
return make_void();
}