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

◆ extract_implementation()

template<ComputeData InputType = Eigen::MatrixXd, ComputeData OutputType = std::vector<std::vector<double>>>
output_type MayaFlux::Yantra::IntervalExtractor< InputType, OutputType >::extract_implementation ( const input_type & input)
inlineoverrideprotected

Definition at line 509 of file IntervalExtractor.hpp.

510 {
511 try {
512 const auto& cfg = this->template config<IntervalExtractorConfig>();
513
516
517 if (m_outstanding) {
519 std::source_location::current(), "An earlier submit has not been collected");
520 }
521 const auto calls = record_all(numeric_data, cfg);
522
524 record.config = cfg;
525 record.channels.resize(numeric_data.size());
526
528 for (size_t channel = 0; channel < numeric_data.size(); ++channel) {
530 for (const auto& [start, end] : record.channels[channel].intervals) {
531 flat[channel].push_back(static_cast<double>(start));
532 flat[channel].push_back(static_cast<double>(end));
533 }
534 }
535
537 output.metadata = input.metadata;
538 output.facets = input.facets;
539 output.facets.set(record);
540 return output;
541 } catch (const std::exception& e) {
542 MF_ERROR(Journal::Component::Yantra, Journal::Context::ComputeMatrix, "Interval extraction failed: {}", e.what());
544 error_result.metadata = input.metadata;
545 error_result.facets = input.facets;
546 return error_result;
547 }
548 }
#define MF_ERROR(comp, ctx,...)
ChannelIntervals read_channel(size_t channel, const ChannelCall &call) const
std::vector< ChannelCall > record_all(const Columns &columns, const IntervalExtractorConfig &cfg)
std::optional< Outstanding > m_outstanding
Finds where each score sequence is engaged, on the GPU, as a stream.
static std::tuple< NumericChannels, DataStructureInfo > extract_structured_double(T &compute_data)
Extract structured double data from Datum container or direct ComputeData with automatic container ha...