summaryrefslogtreecommitdiff
path: root/c++
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2025-07-03 15:37:25 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2025-07-03 15:37:25 +0200
commit6393b959829a1f7513f3daccbaeb9e275fc4ac0d (patch)
tree93dcab7399f955cc9a6bc27a91cdb9ad49f2faea /c++
parent6119b94098385da3983a82a3c1472991e9e2f467 (diff)
Wrote minor iterator confirmation tests
Diffstat (limited to 'c++')
-rw-r--r--c++/geometry.hpp5
-rw-r--r--c++/iterator.hpp18
2 files changed, 23 insertions, 0 deletions
diff --git a/c++/geometry.hpp b/c++/geometry.hpp
index f675a99..fe0fe7e 100644
--- a/c++/geometry.hpp
+++ b/c++/geometry.hpp
@@ -2,6 +2,11 @@
namespace kel {
namespace lbm {
+template<typename Schema>
+struct geometry {
+ void apply(const saw::data<Schema>& field, const saw::data<sch::FixedArray<sch::UInt64,2u>>& start, const saw::data<sch::FixedArray<sch::UInt64,2u>>& end, const saw::data<sch::UInt8>& type){
+ }
+};
}
}
diff --git a/c++/iterator.hpp b/c++/iterator.hpp
new file mode 100644
index 0000000..01163cf
--- /dev/null
+++ b/c++/iterator.hpp
@@ -0,0 +1,18 @@
+#pragma once
+
+#include "descriptor.hpp"
+
+namespace kel {
+namespace lbm {
+template<typename Func>
+void iterate_over(Func&& func, const saw::data<sch::FixedArray<sch::UInt64,2u>>& start, const saw::data<sch::FixedArray<sch::UInt64,2u>>& end, const saw::data<sch::UInt64>& dist = {0u}){
+ // static_assert(D == 2u, "Currently a lazy implementation for AND combinations of intervalls.");
+ for(saw::data<sch::UInt64> i{start.at({0u}) + dist}; (i+dist) < end.at({0u}); ++i){
+ for(saw::data<sch::UInt64> j{start.at({0u}) + dist}; (j+dist) < end.at({1u}); ++j){
+ func({{i,j}});
+ }
+ }
+ return;
+}
+}
+}