MayaFlux 1.0.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 409 of file BufferProcessingChain.cpp.

410{
411 bool all_compatible = true;
412
413 for (const auto& [buffer, processors] : m_buffer_processors) {
414 for (const auto& processor : processors) {
415 auto processor_token = processor->get_processing_token();
416 if (!are_tokens_compatible(m_token_filter_mask, processor_token)) {
417 all_compatible = false;
418 if (incompatibility_reasons) {
419 incompatibility_reasons->push_back(
420 "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)));
421 }
422 }
423 }
424 }
425
426 return all_compatible;
427}
std::shared_ptr< NetworkGeometryBuffer > buffer
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(), buffer, m_buffer_processors, and m_token_filter_mask.

+ Here is the call graph for this function: