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

◆ validate_all_processors()

bool MayaFlux::Buffers::BufferProcessingChain::validate_all_processors ( std::vector< std::string > *  incompatibility_reasons = nullptr) const

Validates all processors in the chain against the preferred processing token.

*

Parameters
incompatibility_reasonsOptional vector to store reasons for any incompatibilities
Returns
true if all processors are compatible with the preferred token, false otherwise

This method checks each processor in the chain against the preferred processing token, ensuring that all processors can execute under the current backend and execution strategy. If any incompatibilities are found, they can be reported through the provided vector.

Definition at line 359 of file BufferProcessingChain.cpp.

360{
361 bool all_compatible = true;
362
363 for (const auto& [buffer, processors] : m_buffer_processors) {
364 for (const auto& processor : processors) {
365 auto processor_token = processor->get_processing_token();
366 if (!are_tokens_compatible(m_token_filter_mask, processor_token)) {
367 all_compatible = false;
368 if (incompatibility_reasons) {
369 incompatibility_reasons->push_back(
370 "Processor with token " + std::to_string(static_cast<uint32_t>(processor_token)) + " incompatible with chain preferred token " + std::to_string(static_cast<uint32_t>(m_token_filter_mask)));
371 }
372 }
373 }
374 }
375
376 return all_compatible;
377}
ProcessingToken m_token_filter_mask
Preferred processing token for this chain.
std::unordered_map< std::shared_ptr< Buffer >, std::vector< std::shared_ptr< BufferProcessor > > > m_buffer_processors
Map of buffers to their processor sequences.
bool are_tokens_compatible(ProcessingToken preferred, ProcessingToken current)
Determines if two processing tokens are compatible for joint execution.

References MayaFlux::Buffers::are_tokens_compatible(), m_buffer_processors, and m_token_filter_mask.

+ Here is the call graph for this function: