From f36a545b0f814d8d35e87262dd80d4d8d8dc4405 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Wed, 6 Aug 2025 14:20:21 +0200 Subject: Extended math setup. Need meta iteration for multi dim array :/ --- modules/codec/c++/schema_math.hpp | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'modules/codec/c++/schema_math.hpp') diff --git a/modules/codec/c++/schema_math.hpp b/modules/codec/c++/schema_math.hpp index 203b88a..ddf95a0 100644 --- a/modules/codec/c++/schema_math.hpp +++ b/modules/codec/c++/schema_math.hpp @@ -4,17 +4,25 @@ namespace saw { namespace schema { -template -struct Complex {}; -template -struct Quaternion { - static_assert(is_primitive::value, "Quaternions assume a primitive type"); +/** + * Tensor Schema. I think I need this due to the amount of mathematical operators being able to be represented by this one construct. + */ +template +struct Tensor { + static constexpr uint64_t Rank = sizeof...(D); + static constexpr std::array Dimension{D...}; + static constexpr string_literal name = "Tensor"; }; -template -struct Euler { - static_assert(is_primitive::value, "Quaternions assume a primitive type"); -}; +template +using Scalar = Tensor; + +template +using Vector = Tensor; + +template +using Matrix = Tensor; + } } -- cgit v1.2.3