diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-07-06 01:37:34 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-07-06 01:37:34 +0200 |
| commit | af4b3f8f9bf7b19c169d9fbd0a2b49668af8ad10 (patch) | |
| tree | 3e98fff4bad333affa55e082de0da759bad57229 /lib/core/c++/index.hpp | |
| parent | 52326efc80dfeae6e830527df2e7803ecf61b00a (diff) | |
| parent | 015e941a91552ce6ea4cde4507ec9451c3708e77 (diff) | |
| download | libs-lbm-af4b3f8f9bf7b19c169d9fbd0a2b49668af8ad10.tar.gz | |
Merge branch 'dev'
Diffstat (limited to 'lib/core/c++/index.hpp')
| -rw-r--r-- | lib/core/c++/index.hpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/core/c++/index.hpp b/lib/core/c++/index.hpp deleted file mode 100644 index 00e597e..0000000 --- a/lib/core/c++/index.hpp +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once - -#include "common.hpp" - -namespace kel { -namespace lbm { - -template<typename T, uint64_t D> -saw::data<sch::FixedArray<sch::UInt64,D>> lower_index_from_pos(const saw::data<sch::Vector<T,D>>& pos){ - saw::data<sch::FixedArray<sch::UInt64,D>> ind; - - for(saw::data<sch::UInt64> i{0u}; i < ind.size(); ++i){ - ind.at(i).set(std::max(pos.at(i).template cast_to<sch::UInt64>().get(),0)); - } - - return ind; -} - -template<typename T, uint64_t D> -saw::data<sch::FixedArray<sch::UInt64,D>> upper_index_from_pos(const saw::data<sch::Vector<T,D>>& pos){ - auto ind = lower_index_from_pos(pos); - - for(saw::data<sch::UInt64> i{0u}; i < ind.size(); ++i){ - ++ind.at(i); - } - return ind; -} - -} -} |
