summaryrefslogtreecommitdiff
path: root/lib/core/c++/chunk.hpp
blob: bfef3588600a1783f6fc19ecc236017471903926 (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
#pragma once

#include "common.hpp"

namespace kel {
namespace lbm {
namespace sch {
namespace impl {
template<typename Sch, uint64_t Dim, uint64_t Side, typename... AddedSides>
struct chunk_schema_type_helper {
	using Schema = typename chunk_schema_type_helper<Sch,Dim-1u,Side,AddedSides...,Side>::Schema;
};

template<typename Sch, uint64_t Side, typename... AddedSides>
struct chunk_schema_type_helper<Sch, 0u, Side, AddedSides...> {
	using Schema = FixedArray<Sch,AddedSides...>;
};
}


template<typename Schema, uint64_t Dim, uint64_t Side, uint64_t Ghost = 0u>
struct Chunk {
	using InnerSchema = typename impl::chunk_schema_type_helper<Sch, Dim, Side + (2u*Ghost)>::Schema;
};

template<typename ChunkSchema, uint64_t Dim>
using SuperChunk = Array<ChunkSchema,Dim>;
}
}
}

namespace saw {
template<typename Sch, uint64_t Dim, uint64_t Side, uint64_t Ghost, typename Encode>
class data<kel::lbm::sch::Chunk<Sch,Dim,Side,Ghost>,Encode> final {
private:
public:
};
}