summaryrefslogtreecommitdiff
path: root/c++/descriptor.hpp
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2025-04-11 13:36:15 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2025-04-11 13:36:15 +0200
commit6aa3606c200b0f5aafb5031ad459c316c25bf1b8 (patch)
treee6019e94f04e6a9a4f5a7817546e120d72a45934 /c++/descriptor.hpp
parentabeea9920c11231ed24db00e9f68b4490c12a61b (diff)
Revert to AoS for now due to code intensity required
Diffstat (limited to 'c++/descriptor.hpp')
-rw-r--r--c++/descriptor.hpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/c++/descriptor.hpp b/c++/descriptor.hpp
index 376e733..1228e10 100644
--- a/c++/descriptor.hpp
+++ b/c++/descriptor.hpp
@@ -23,13 +23,13 @@ struct Cell {
};
template<typename Desc, typename Cell>
-struct CellFields;
+struct CellField;
template<typename Desc, typename... CellFieldTypes, saw::string_literal... CellFieldNames>
-struct CellFields<
+struct CellField<
Desc,
Struct<
- Member<Array<CellFieldTypes,Desc::D>, CellFieldNames>...
+ Member<CellFieldTypes, CellFieldNames>...
>
>;
@@ -163,9 +163,9 @@ struct meta_schema<kel::lbm::sch::Cell<T,Desc,S,D,Q>> {
};
template<typename Desc, typename CellT>
-struct meta_schema<kel::lbm::sch::CellFields<Desc, CellT>> {
+struct meta_schema<kel::lbm::sch::CellField<Desc, CellT>> {
using MetaSchema = schema::FixedArray<schema::UInt64,Desc::D>;
- using Schema = kel::lbm::sch::CellFields<Desc, CellT>;
+ using Schema = kel::lbm::sch::CellField<Desc, CellT>;
};
template<typename Sch, typename Desc, uint64_t S, uint64_t D, uint64_t Q, typename Encode>
@@ -187,13 +187,12 @@ public:
};
template<typename Desc, typename CellT, typename Encode>
-class data<kel::lbm::sch::CellFields<Desc, CellT>, Encode> final {
+class data<kel::lbm::sch::CellField<Desc, CellT>, Encode> final {
public:
- using Schema = kel::lbm::sch::CellFields<Desc,CellT>;
+ using Schema = kel::lbm::sch::CellField<Desc,CellT>;
using MetaSchema = typename meta_schema<Schema>::MetaSchema;
private:
- data<CellT, Encode> inner_;
- data<MetaSchema, Encode> inner_meta_;
+ data<schema::Array<CellT,Desc::D>, Encode> inner_;
public:
data() = default;
data(const data<MetaSchema,Encode>& inner_meta__):
@@ -201,6 +200,10 @@ public:
inner_meta_{inner_meta__}
{}
+ const data<MetaSchema, Encode>& meta() const {
+ return inner_.dims();
+ }
+
template<uint64_t i>
data<schema::UInt64,Encode> get_dim_size() const {
static_assert(i < Desc::D, "Not enough dimensions");