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 253 of file BufferProcessingChain.cpp.
254{
255 for (
const auto& [buffer, processors] : other->
get_chain()) {
258 } else {
260 target_processors.reserve(target_processors.size() + processors.size());
261
262 for (const auto& processor : processors) {
263 if (std::ranges::find(target_processors, processor) == target_processors.end()) {
264 target_processors.push_back(processor);
265 }
266 }
267 }
268 }
269}
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.