From 25a1c2485c5187c61a8efc9f5b62d4d942124d47 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 21 Jul 2026 23:43:20 +0200 Subject: Dangling --- modules/core/c++/descriptor/common.hpp | 9 +++++++ modules/core/c++/descriptor/d1q3.hpp | 9 +++++++ modules/core/tests/schema.cpp | 19 ++++++++++++++ poc/triangle_stream/common.hpp | 46 +++++++++++++++++++++++++++++++++ poc/triangle_stream/init.hpp | 13 ++++++++++ poc/triangle_stream/sim.cpp | 47 +--------------------------------- poc/triangle_stream/step.hpp | 8 ++++++ 7 files changed, 105 insertions(+), 46 deletions(-) create mode 100644 modules/core/c++/descriptor/common.hpp create mode 100644 modules/core/c++/descriptor/d1q3.hpp create mode 100644 modules/core/tests/schema.cpp create mode 100644 poc/triangle_stream/common.hpp create mode 100644 poc/triangle_stream/init.hpp create mode 100644 poc/triangle_stream/step.hpp diff --git a/modules/core/c++/descriptor/common.hpp b/modules/core/c++/descriptor/common.hpp new file mode 100644 index 0000000..f821510 --- /dev/null +++ b/modules/core/c++/descriptor/common.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "../common.hpp" + +namespace kel { +namespace lbm { + +} +} diff --git a/modules/core/c++/descriptor/d1q3.hpp b/modules/core/c++/descriptor/d1q3.hpp new file mode 100644 index 0000000..7fc8591 --- /dev/null +++ b/modules/core/c++/descriptor/d1q3.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "common.hpp" + +namespace kel { +namespace lbm { + +} +} diff --git a/modules/core/tests/schema.cpp b/modules/core/tests/schema.cpp new file mode 100644 index 0000000..b705af0 --- /dev/null +++ b/modules/core/tests/schema.cpp @@ -0,0 +1,19 @@ +#include + +#include "../c++/abstract/schema.hpp" + +namespace { +namespace ts { +using namespace kel::lbm::sch; + +using TPtr = Ptr; +using TVal = UInt16; +} + +SAW_TEST("Abstract/Schema/Ptr"){ + using namespace kel::lbm; + + // static_assert(std::is_same_v::Schema, ts::TVal>, "schema decay failed"); +} + +} diff --git a/poc/triangle_stream/common.hpp b/poc/triangle_stream/common.hpp new file mode 100644 index 0000000..927f8f8 --- /dev/null +++ b/poc/triangle_stream/common.hpp @@ -0,0 +1,46 @@ +#pragma once + +#include + +namespace kel { +namespace lbm { + +constexpr uint64_t dim_y = 256ul; +constexpr uint64_t dim_x = dim_y * 20ul; + +namespace sch { +using namespace saw::schema; + +using InfoChunk = Chunk; + +template +using DfChunk = Chunk, 1u, dim_x, dim_y>; + +template +using ScalarChunk = Chunk, 0u, dim_x, dim_y>; + +template +using VectorChunk = Chunk, 0u, dim_x, dim_y>; + +template +using ChunkStruct = Struct< + Member, + Member, "dfs">, + Member, "dfs_old"> +>; + +template +using VelChunk = Chunk, 0u, dim_x, dim_y>; + +template +using RhoChunk = Chunk, 0u, dim_x, dim_y>; + +template +using MacroStruct = Struct< + Member, "velocity">, + Member, "density"> +>; +} + +} +} diff --git a/poc/triangle_stream/init.hpp b/poc/triangle_stream/init.hpp new file mode 100644 index 0000000..532f08c --- /dev/null +++ b/poc/triangle_stream/init.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include "common.hpp" + +namespace kel { +namespace lbm { + +template +void init(){ +} + +} +} diff --git a/poc/triangle_stream/sim.cpp b/poc/triangle_stream/sim.cpp index 36986e4..b2121ee 100644 --- a/poc/triangle_stream/sim.cpp +++ b/poc/triangle_stream/sim.cpp @@ -1,53 +1,8 @@ -#include +#include "common.hpp" namespace kel { namespace lbm { -constexpr uint64_t dim_y = 256ul; -constexpr uint64_t dim_x = dim_y * 20ul; - -namespace sch { -using namespace saw::schema; - -using InfoChunk = Chunk; - -template -using DfChunk = Chunk, 1u, dim_x, dim_y>; - -template -using ScalarChunk = Chunk, 0u, dim_x, dim_y>; - -template -using VectorChunk = Chunk, 0u, dim_x, dim_y>; - -template -using ChunkStruct = Struct< - Member, - Member, "dfs">, - Member, "dfs_old"> ->; - -template -using VelChunk = Chunk, 0u, dim_x, dim_y>; - -template -using RhoChunk = Chunk, 0u, dim_x, dim_y>; - -template -using MacroStruct = Struct< - Member, "velocity">, - Member, "density"> ->; - -//template -//using ParticleArray = Array< -// Particle -//>; -} - -template -void init(){ -} template saw::error_or kmain(int argc, char** argv){ diff --git a/poc/triangle_stream/step.hpp b/poc/triangle_stream/step.hpp new file mode 100644 index 0000000..e10c4db --- /dev/null +++ b/poc/triangle_stream/step.hpp @@ -0,0 +1,8 @@ +#pragma once + +#include "schema.hpp" + +namespace kel { +namespace lbm { +} +} -- cgit v1.2.3