26 const Tkey *__restrict__ key,
u32 first,
u32 last,
const Tkey &value) {
30 auto length = last - first;
32 auto rem = length % 2;
34 if (key[first + length] <= value) {
35 first += length + rem;
std::uint32_t u32
32 bit unsigned integer
Shamrock assertion utility.
namespace for primitive algorithm (e.g. sort, scan, reductions, ...)
constexpr u32 binary_search_upper_bound(const Tkey *__restrict__ key, u32 first, u32 last, const Tkey &value)
GPU compatible implementation of std::upper_bound.