33#include <NDEVR/BaseValues.h>
44 static void wait(
void*
object, std::unique_lock<std::mutex>& lock);
45 static void wait(
void*
object,
uint08 time, std::unique_lock<std::mutex>& lock);
46 static void notify(
void*
object);
47 static void notifyAll(
void*
object);
48 template<
class t_type,
class t_function_type>
51 ParallelGrainSort(data, len,
getMax(1024U, len / 16U), function);
53 template<
class t_type,
class t_function_type>
60 std::sort(data, data + len, function);
64 auto future = std::async(ParallelGrainSort<t_type, t_function_type>, data, len / 2, grain_size, function);
68 ParallelGrainSort(data + len / 2, len - len / 2, grain_size, function);
72 std::inplace_merge(data, data + len / 2, data + len, function);
Definition ConcurrentOperation.h:40
static void ParallelSort(t_type *data, uint04 len, t_function_type function)
Definition ConcurrentOperation.h:49
static void ParallelGrainSort(t_type *data, uint04 len, uint04 grain_size, const t_function_type &function)
Definition ConcurrentOperation.h:54
constexpr t_type getMax(const t_type &left, const t_type &right)
Finds the max of the given arguments using the > operator.
Definition BaseFunctions.hpp:116
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer -Can represent exact integer values 0 thro...
Definition BaseValues.hpp:132
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120