Combines another processing pipeline into this one with optimization.
- Parameters
-
| other | Chain to merge into this one |
Adds all processors from the other chain to this one, preserving their buffer associations and order while performing intelligent optimization. This enables the composition of complex transformation pipelines from simpler, reusable components:
- Compatibility Analysis: Validates that merged processors are compatible
- Optimization Opportunities: Identifies potential performance improvements in the combined pipeline
- Resource Consolidation: Optimizes resource usage across the merged processors
- Backend Harmonization: Resolves any backend conflicts between the chains
Definition at line 217 of file BufferProcessingChain.cpp.
218{
219 for (
const auto& [buffer, processors] : other->
get_chain()) {
222 } else {
224 target_processors.reserve(target_processors.size() + processors.size());
225
226 for (const auto& processor : processors) {
227 if (std::ranges::find(target_processors, processor) == target_processors.end()) {
228 target_processors.push_back(processor);
229 }
230 }
231 }
232 }
233}
std::unordered_map< std::shared_ptr< Buffer >, std::vector< std::shared_ptr< BufferProcessor > > > m_buffer_processors
Map of buffers to their processor sequences.
std::unordered_map< std::shared_ptr< Buffer >, std::vector< std::shared_ptr< BufferProcessor > > > get_chain() const
Gets the entire transformation pipeline structure.
References m_buffer_processors.