![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Binary range search algorithm. More...
#include "shambase/aliases_int.hpp"#include "shambase/assert.hpp"#include "shamalgs/primitives/lower_bound.hpp"#include "shamalgs/primitives/upper_bound.hpp"
Include dependency graph for binary_range_search.hpp:Go to the source code of this file.
Namespaces | |
| namespace | shamalgs |
| namespace to contain everything implemented by shamalgs | |
| namespace | shamalgs::primitives |
| namespace for primitive algorithm (e.g. sort, scan, reductions, ...) | |
Functions | |
| template<class Tkey > | |
| constexpr void | shamalgs::primitives::binary_range_search (const Tkey *__restrict__ key, u32 first, u32 last, const Tkey &value_min, const Tkey &value_max, u32 &inf, u32 &sup) |
| Find the range of indices for which key[inf] <= value_min <= value_max <= key[sup]. | |
Binary range search algorithm.
Definition in file binary_range_search.hpp.