diff options
Diffstat (limited to 'modules/core/c++/abstract')
| -rw-r--r-- | modules/core/c++/abstract/data.hpp | 52 | ||||
| -rw-r--r-- | modules/core/c++/abstract/templates.hpp | 8 |
2 files changed, 60 insertions, 0 deletions
diff --git a/modules/core/c++/abstract/data.hpp b/modules/core/c++/abstract/data.hpp new file mode 100644 index 0000000..ed23268 --- /dev/null +++ b/modules/core/c++/abstract/data.hpp @@ -0,0 +1,52 @@ +#pragma once + +#include "templates.hpp" + +namespace kel { +namespace sch { +struct Void {}; + +struct UnsignedInteger {}; +struct SignedInteger {}; +struct FloatingPoint {}; + +template<typename StorageT, typename InterfaceT> +struct MixedPrecision { + using Meta = Void; + using StorageType = StorageT; + using InterfaceType = InterfaceT; +}; + +template<typename PrimType, uint64_t N> +struct Primitive { + using Meta = Void; + using Type = PrimType; + static constexpr uint64_t Bytes = N; +}; + +template<typename T, uint64_t... Dims> +struct FixedArray { + using Meta = Void; + using Inner = T; + static constexpr std::array<uint64_t,sizeof...(Dims)> Dimensions{Dims...}; +}; + +template<typename T, uint64_t Dims> +struct Array { + using Meta = FixedArray<UInt64,Dims>; + using Inner = T; + static constexpr std::array<uint64_t,sizeof...(Dims)> Dimensions{Dims}; +}; + +template<typename... T> +struct Tuple { +}; + +} + +template<typename Sch> +struct schema { + using Type = Sch; +}; + +} diff --git a/modules/core/c++/abstract/templates.hpp b/modules/core/c++/abstract/templates.hpp new file mode 100644 index 0000000..d9d9faa --- /dev/null +++ b/modules/core/c++/abstract/templates.hpp @@ -0,0 +1,8 @@ +#pragma once + +namespace kel { +namespace lbm { +template<typename... T> +constexpr bool always_false = false; +} +} |
