MayaFlux 0.1.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 305 of file BufferProcessingChain.cpp.

306{
307 bool all_compatible = true;
308
309 for (const auto& [buffer, processors] : m_buffer_processors) {
310 for (const auto& processor : processors) {
311 auto processor_token = processor->get_processing_token();
312 if (!are_tokens_compatible(m_token_filter_mask, processor_token)) {
313 all_compatible = false;
314 if (incompatibility_reasons) {
315 incompatibility_reasons->push_back(
316 "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)));
317 }
318 }
319 }
320 }
321
322 return all_compatible;
323}
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: