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

◆ extract_chunked_data()

template<ComputeData InputType = Kakshya::DataVariant, ComputeData OutputType = InputType>
std::vector< InputType > MayaFlux::Yantra::StandardSorter< InputType, OutputType >::extract_chunked_data ( std::vector< std::span< double > >  channels,
DataStructureInfo  info 
)
inlineprivate

Definition at line 259 of file StandardSorter.hpp.

260 {
261 std::vector<InputType> chunks;
262
263 for (size_t start = 0; start < channels[0].size(); start += m_chunk_size) {
264 std::vector<std::vector<double>> chunk_data;
265 chunk_data.resize(channels.size());
266
267 for (size_t ch = 0; ch < channels.size(); ++ch) {
268 size_t end = std::min(start + m_chunk_size, channels[ch].size());
269 auto chunk_span = channels[ch].subspan(start, end - start);
270
271 chunk_data[ch].assign(chunk_span.begin(), chunk_span.end());
272 sort_span_inplace(std::span<double>(chunk_data[ch]), this->get_direction(), m_algorithm);
273 }
274
275 chunks.push_back(OperationHelper::reconstruct_from_double<InputType>(chunk_data, info));
276 }
277
278 return chunks;
279 }
SortingDirection get_direction() const
void sort_span_inplace(std::span< double > data, SortingDirection direction, SortingAlgorithm algorithm)
Sort a single span of doubles in-place.

References MayaFlux::Yantra::sort_span_inplace().

+ Here is the call graph for this function: