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

◆ record_resident()

template<ComputeData InputType = Eigen::MatrixXd, ComputeData OutputType = std::vector<std::vector<double>>>
std::vector< ChannelCall > MayaFlux::Yantra::IntervalExtractor< InputType, OutputType >::record_resident ( std::span< const uint32_t > counts,
const IntervalExtractorConfig & cfg )
inlineprivate

Definition at line 614 of file IntervalExtractor.hpp.

615 {
617 reset_state(counts.size());
618
619 for (size_t channel = 0; channel < counts.size(); ++channel) {
620 if (channel >= m_resident.size() || !m_resident[channel]) {
622 std::source_location::current(), "Channel {} has no device scores bound", channel);
623 }
624 const auto& settings = cfg.settings_of(channel);
625 check_settings(settings, cfg.length);
627 check_gate(settings.gate_channel, counts.size(), counts[channel]);
628 if (counts[settings.gate_channel] != counts[channel]) {
630 std::source_location::current(), "Gate column {} has {} scores and column {} has {}",
631 settings.gate_channel, counts[settings.gate_channel], channel, counts[channel]);
632 }
633 if (settings.gate_channel >= m_resident.size() || !m_resident[settings.gate_channel]) {
635 std::source_location::current(), "Gate column {} has no device scores bound", settings.gate_channel);
636 }
637 }
638 }
639
641 for (size_t channel = 0; channel < counts.size(); ++channel) {
642 calls[channel] = prepare_channel(channel, {}, true, counts[channel], cfg.flush);
643 }
646 return calls;
647 }
static void check_gate(uint32_t gate, size_t columns, size_t length)
static void check_settings(const IntervalScanSettings &settings, uint32_t length)
ChannelCall prepare_channel(size_t channel, std::span< const double > scores, bool resident, uint32_t resident_count, bool flush)
Makes a column's buffers, uploads its scores and state, and counts the call.
std::vector< ChannelCall > m_last_calls
void record_scans(const std::vector< ChannelCall > &calls, const IntervalExtractorConfig &cfg)
Records one scan per column that ran, each with its own settings.
static bool gated_by_other(const IntervalScanSettings &settings, size_t channel)
Finds where each score sequence is engaged, on the GPU, as a stream.

Referenced by MayaFlux::Yantra::IntervalExtractor< Eigen::MatrixXd, std::vector< std::vector< double > > >::extract_resident(), and MayaFlux::Yantra::IntervalExtractor< Eigen::MatrixXd, std::vector< std::vector< double > > >::submit_resident().

Here is the caller graph for this function: