summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2025-08-07 16:50:09 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2025-08-07 16:50:09 +0200
commit153f808a0eb648a28a2203a96a5d68f9245e361b (patch)
tree29d4c2640172ccb3cc9b28069143716c6701f311 /modules
parentf8fbf83023ad218075d5cbbec5f63fe824bcfee8 (diff)
Added schema meta deduction for Tensor
Diffstat (limited to 'modules')
-rw-r--r--modules/codec/c++/schema_math.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/codec/c++/schema_math.hpp b/modules/codec/c++/schema_math.hpp
index ddf95a0..fa73ba5 100644
--- a/modules/codec/c++/schema_math.hpp
+++ b/modules/codec/c++/schema_math.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "schema.hpp"
+#include "schema_meta.hpp"
namespace saw {
namespace schema {
@@ -25,4 +26,10 @@ template<typename Inner, uint64_t D1, uint64_t D2>
using Matrix = Tensor<Inner,D1,D2>;
}
+
+template<typename Inner, uint64_t... D>
+struct meta_schema<schema::Tensor<Inner, D...>> {
+ using Schema = schema::Tensor<Inner, D...>;
+ using MetaSchema = schema::FixedArray<schema::UInt64, sizeof...(D)>;
+};
}