diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-01-20 12:56:14 +0100 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-01-20 12:56:14 +0100 |
| commit | e8a72234dc585459d2a5dc95ff601e8a212e0b71 (patch) | |
| tree | 633b921c76fec9b685ae0255e6c94ade71ffa4aa /lib/core/c++ | |
| parent | 5b11a9374a0f7e6fb667d63519c2714a934398b0 (diff) | |
| download | libs-lbm-e8a72234dc585459d2a5dc95ff601e8a212e0b71.tar.gz | |
Added Chunk Size deduction for ghost layer
Diffstat (limited to 'lib/core/c++')
| -rw-r--r-- | lib/core/c++/chunk.hpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/core/c++/chunk.hpp b/lib/core/c++/chunk.hpp index 223ceec..1950661 100644 --- a/lib/core/c++/chunk.hpp +++ b/lib/core/c++/chunk.hpp @@ -6,26 +6,24 @@ namespace kel { namespace lbm { namespace sch { namespace impl { -template<typename Sch, uint64_t Ghost, typename LeftG, typename RightG> -struct chunk_schema_type_helper { - using Schema = typename chunk_schema_type_helper<Sch,Ghost,LeftG,RightG>::Schema; -}; +template<typename Sch, uint64_t Ghost, typename LeftG, typename RightG = saw::tmpl_value_group<uint64_t>> +struct chunk_schema_type_helper; -template<typename Sch, uint64_t Ghost, typename Side0, typename... Sides, typename... AddedSides> -struct chunk_schema_type_helper<Sch, Ghost, saw::tmpl_group<Side0,Sides...>, saw::tmpl_group<AddedSides...>> final { - using Schema = FixedArray<Sch,AddedSides...>; +template<typename Sch, uint64_t Ghost, uint64_t Side0, uint64_t... Sides, uint64_t... AddedSides> +struct chunk_schema_type_helper<Sch, Ghost, saw::tmpl_value_group<uint64_t,Side0,Sides...>, saw::tmpl_value_group<uint64_t,AddedSides...>> final { + using Schema = typename chunk_schema_type_helper<Sch,Ghost,saw::tmpl_value_group<uint64_t,Sides...>, saw::tmpl_value_group<uint64_t,AddedSides...,(Side0+2u*(Ghost))>>::Schema; }; template<typename Sch, uint64_t Ghost, uint64_t... AddedSides> -struct chunk_schema_type_helper<Sch, Ghost, saw::tmpl_group<Side0,Sides...>, saw::tmpl_group<AddedSides...>> final { +struct chunk_schema_type_helper<Sch, Ghost, saw::tmpl_value_group<uint64_t>, saw::tmpl_value_group<uint64_t,AddedSides...>> final { using Schema = FixedArray<Sch,AddedSides...>; }; } -template<typename Schema, uint64_t Ghost, uint64_t... Side> +template<typename Sch, uint64_t Ghost, uint64_t... Sides> struct Chunk { - using InnerSchema = typename impl::chunk_schema_type_helper<Sch, Ghost, Side...>::Schema; + using InnerSchema = typename impl::chunk_schema_type_helper<Sch, Ghost, saw::tmpl_value_group<uint64_t,Sides...>>::Schema; }; // Not needed for now |
