MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ sort_compute_data_extract() [2/2]

template<ComputeData T>
T MayaFlux::Yantra::sort_compute_data_extract ( const T &  data,
SortingDirection  direction,
SortingAlgorithm  algorithm 
)

Universal sort function - returns sorted copy.

Template Parameters
TComputeData type
Parameters
dataData to sort (not modified)
directionSort direction
algorithmSort algorithm
Returns
Sorted copy of the data

Definition at line 66 of file SortingHelper.hpp.

69{
70 if constexpr (RequiresContainer<T>) {
71 static_assert(std::is_same_v<T, void>,
72 "Region-like types require container parameter - use UniversalSorter instead");
73 return T {};
74 }
75
76 std::vector<std::vector<double>> working_buffer;
77 auto [working_spans, structure_info] = OperationHelper::setup_operation_buffer(
78 const_cast<T&>(data), working_buffer);
79
80 Kinesis::Discrete::sort_channels(working_spans, direction, algorithm);
81
82 return OperationHelper::reconstruct_from_double<T>(working_buffer, structure_info);
83}

References MayaFlux::Yantra::OperationHelper::setup_operation_buffer(), and MayaFlux::Kinesis::Discrete::sort_channels().

Referenced by sort_compute_data(), MayaFlux::Yantra::StandardSorter< InputType, OutputType >::sort_data_copy(), and MayaFlux::Yantra::StandardSorter< InputType, OutputType >::sort_data_partial().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: