summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorClaudius 'keldu' Holeksa <mail@keldu.de>2024-08-20 15:25:26 +0200
committerClaudius 'keldu' Holeksa <mail@keldu.de>2024-08-20 15:25:26 +0200
commitd22f18470f9b0b44b70f799283de60ab4ccc3a58 (patch)
tree36cd09a79fb5968d319b20eeab233dddff1b0919 /modules
parentf0bc36c49adee797f9b89b41b6e12f6a2137b499 (diff)
Raw Data
Diffstat (limited to 'modules')
-rw-r--r--modules/codec/c++/data_raw.hpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/modules/codec/c++/data_raw.hpp b/modules/codec/c++/data_raw.hpp
index 3081423..40751a3 100644
--- a/modules/codec/c++/data_raw.hpp
+++ b/modules/codec/c++/data_raw.hpp
@@ -9,6 +9,21 @@ struct NativeRaw {
};
}
+template<typename T>
+struct raw_native_array_type_helper {
+ using type = data<T,encode::NativeRaw>;
+};
+
+template<typename T, uint64_t N>
+struct raw_native_array_type_helper<schema::Primitive<T,N>> {
+ using Type = typename native_data_type<schema::Primitive<T,N>>::type;
+};
+
+template<typename T, typename S>
+struct raw_native_array_type_helper<schema::MixedPrecision<T,S>> {
+ using Type = typename native_data_type<typename schema::MixedPrecision<T,S>::StorageSchema>::type;
+};
+
template<>
class data<schema::Void, encode::NativeRaw> {
public:
@@ -321,13 +336,18 @@ class data<schema::Array<T,Dim>, encode::NativeRaw, storage::Default> {
public:
using Schema = schema::Array<T,Dim>;
using MetaSchema = typename meta_schema<Schema>::MetaSchema;
+
+ using DataType = std::conditional<
+ is_primitive<typename T>::value,
+ typename native_data_type<T>::type
+ >;
private:
// data<schema::FixedArray<schema::UInt64, Dim>> dims_;
std::array<uint64_t, Dim> dims_;
std::vector<
std::conditional<
is_primitive<Schema>::value,
- typename native_data_type<Schema>::type,
+ typename native_data_type<T>::type,
data<T, encode::NativeRaw, storage::Default>
>
> value_;