MCPcopy Create free account
hub / github.com/DragonJoker/RenderGraph / removeShortcuts

Function removeShortcuts

source/RenderGraph/GraphBuilder.cpp:463–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

461 }
462
463 static void removeShortcuts( GraphNode & node )
464 {
465 GraphAdjacentNodeArray & predecessors = node.getPredecessors();
466 auto it = predecessors.begin();
467
468 while ( it != predecessors.end() )
469 {
470 auto curr = *it;
471 bool found = false;
472 auto oit = predecessors.begin();
473 while ( oit != predecessors.end() && !found )
474 {
475 if ( oit != it )
476 found = hasInPredecessors( **oit, *curr );
477 ++oit;
478 }
479
480 removeShortcuts( *curr );
481 if ( found )
482 it = predecessors.erase( it );
483 else
484 ++it;
485 }
486 }
487
488 static void sortNodes( GraphNode & node
489 , GraphNodePtrArray & sourceGraph

Callers 1

buildGraphFunction · 0.85

Calls 4

hasInPredecessorsFunction · 0.85
beginMethod · 0.80
eraseMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected