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

◆ buffers()

template<ComputeData InputType = Eigen::MatrixXd, ComputeData OutputType = std::vector<std::vector<double>>>
std::vector< IntervalBuffers > MayaFlux::Yantra::IntervalExtractor< InputType, OutputType >::buffers ( ) const
inlinenodiscard

Device views of the results of the latest call, one per channel.

Valid as soon as the call has recorded, so after submit they can be handed to a consumer before the work completes. Empty before any call.

Definition at line 459 of file IntervalExtractor.hpp.

460 {
462 for (size_t channel = 0; channel < m_last_calls.size(); ++channel) {
463 if (!m_last_calls[channel].ran) {
464 continue;
465 }
466 const size_t runs = binding_of(channel, Runs);
467 const size_t report = binding_of(channel, Report);
468 views[channel] = {
469 .runs_address = m_context->shared_buffer_address(0, runs),
470 .report_address = m_context->shared_buffer_address(0, report),
471 .capacity = m_last_calls[channel].capacity,
472 .runs = std::make_shared<Portal::Graphics::GpuBufferHandle>(m_context->shared_buffer_handle(0, runs)),
473 .report = std::make_shared<Portal::Graphics::GpuBufferHandle>(m_context->shared_buffer_handle(0, report)),
474 };
475 }
476 return views;
477 }
std::unique_ptr< ShaderExecutionContext<> > m_context
std::vector< ChannelCall > m_last_calls
static size_t binding_of(size_t channel, Slot slot)
Finds where each score sequence is engaged, on the GPU, as a stream.