summaryrefslogtreecommitdiff
path: root/modules/core/c++/abstract/schema.hpp
blob: 8305005b12c337a4b9ae6abb1bc4d43731a8ba97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#pragma once

#include "string_literal.hpp"
#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 StorageType = PrimType;
	using InterfaceType = 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 Value, string_literal Key>
struct Member {};

template<typename... SL>
struct Struct {};

}

template<typename Sch>
struct schema {
	using Type = Sch;
};

}