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

◆ sort_chunked()

template<ComputeData InputType = Kakshya::DataVariant, ComputeData OutputType = InputType>
output_type MayaFlux::Yantra::StandardSorter< InputType, OutputType >::sort_chunked ( const input_type data)
inlineprivate

Chunked sorting implementation.

Definition at line 284 of file StandardSorter.hpp.

285 {
286 try {
287 auto [data_span, structure_info] = OperationHelper::extract_structured_double(
288 const_cast<input_type&>(data));
289 return merge_chunks_to_result(extract_chunked_data(data_span, structure_info), data, structure_info);
290
291 } catch (...) {
292 return { sort_data_copy(data) };
293 }
294 }
static std::tuple< std::vector< std::span< double > >, DataStructureInfo > extract_structured_double(T &compute_data)
Extract structured double data from IO container or direct ComputeData with automatic container handl...
InputType sort_data_copy(const input_type &data)
Sort data with copy semantics.
typename base_type::input_type input_type
output_type merge_chunks_to_result(const std::vector< InputType > &chunks, const input_type &original_input, DataStructureInfo info)
Merge chunks back to single result.
std::vector< InputType > extract_chunked_data(std::vector< std::span< double > > channels, DataStructureInfo info)