34 template<
class T,
class Comp>
36 for (
u32 i = start + 1;
i < end; ++
i) {
39 while (
j > start &&
comp(
key, data[
j - 1])) {
40 data[
j] = data[
j - 1];
47 template<
int I,
int ArrSize>
49 template<
typename K,
typename Comp>
54 std::swap(keys[
i], keys[
i + 1]);
62 template<
typename K,
typename Comp>
78 template<
class T,
int ArrSize,
class Comp>
std::uint8_t u8
8 bit unsigned integer
std::uint32_t u32
32 bit unsigned integer
namespace for basic c++ utilities
void odd_even_transpose_sort_segment_flags(T *data, const u8 *segment_boundary, Comp comp)
Odd-even transpose sort with segment boundaries.
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.
void ptr_insert_sort(T *data, u32 start, u32 end, Comp &&comp)
Simple insertion sort on pointer range.