From 6393b959829a1f7513f3daccbaeb9e275fc4ac0d Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Thu, 3 Jul 2025 15:37:25 +0200 Subject: Wrote minor iterator confirmation tests --- c++/geometry.hpp | 5 +++++ c++/iterator.hpp | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 c++/iterator.hpp (limited to 'c++') 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 +struct geometry { + void apply(const saw::data& field, const saw::data>& start, const saw::data>& end, const saw::data& 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 +void iterate_over(Func&& func, const saw::data>& start, const saw::data>& end, const saw::data& dist = {0u}){ + // static_assert(D == 2u, "Currently a lazy implementation for AND combinations of intervalls."); + for(saw::data i{start.at({0u}) + dist}; (i+dist) < end.at({0u}); ++i){ + for(saw::data j{start.at({0u}) + dist}; (j+dist) < end.at({1u}); ++j){ + func({{i,j}}); + } + } + return; +} +} +} -- cgit v1.2.3