umd/core/src/compiler/engine-ast/EngineGraph.cpp
NvDlaError engine_ast::Graph::flattenGraph()
{
    NvDlaError e = NvDlaSuccess;
    NodeSequence allNodes = orderedNodes();
    for (NodeSequence::const_iterator ni = allNodes.begin(); ni != allNodes.end(); ++ni)
    {
        if ( (*ni)->engineType() == EngineTypeEnum::MULTI_OPS)
        {
            PROPAGATE_ERROR_FAIL(engine_ast::NodeFactory::nodeCast<MultiOpsNode*>(*ni)->plugNestedGraph());
        }
    }

    // check dirty and re-determine graph order
    checkDirty();
    PROPAGATE_ERROR_FAIL(refreshGraphState());

fail:
    return e;
}
/*---------------------------------Flatten Graph-----------------------*/
/*
 * Since dependencies calculation needs to see all possible operation nodes in the flat land
 * and cannot efficiently deal with hierarchical nodes, flatten all the superNodes that there
 * may be by plugging in their nested graph contents into the base graph.
 */
Flatten Graph
Since dependencies calculation needs to see all possible operation nodes in the flat land
and cannot efficiently deal with hierarchical nodes, flatten all the superNodes that there
may be by plugging in their nested graph contents into the base graph.
Flatten Graph Since dependencies calculation needs to see all possible operation nodes in the flat land and cannot efficiently deal with hierarchical nodes flatten all the superNodes that there may be by plugging in their nested graph contents into the base graph .
NvDlaError engine_ast::Graph::flattenGraph()
{
    NvDlaError e = NvDlaSuccess;
    NodeSequence allNodes = orderedNodes();
    for (NodeSequence::const_iterator ni = allNodes.begin(); ni != allNodes.end(); ++ni)
    {
        if ( (*ni)->engineType() == EngineTypeEnum::MULTI_OPS)
        {
            PROPAGATE_ERROR_FAIL(engine_ast::NodeFactory::nodeCast<MultiOpsNode*>(*ni)->plugNestedGraph());
        }
    }
    checkDirty();
    PROPAGATE_ERROR_FAIL(refreshGraphState());
fail:
    return e;
}
NvDlaError engine_ast :: Graph :: flattenGraph ( ) { NvDlaError e = NvDlaSuccess ; NodeSequence allNodes = orderedNodes ( ) ; for ( NodeSequence :: const_iterator ni = allNodes . begin ( ) ; ni != allNodes . end ( ) ; ++ ni ) { if ( ( * ni ) -> engineType ( ) == EngineTypeEnum :: MULTI_OPS ) { PROPAGATE_ERROR_FAIL ( engine_ast :: NodeFactory :: nodeCast < MultiOpsNode * > ( * ni ) -> plugNestedGraph ( ) ) ; } } checkDirty ( ) ; PROPAGATE_ERROR_FAIL ( refreshGraphState ( ) ) ; fail : return e ; }
Flatten Graph
 Since dependencies calculation needs to see all possible operation nodes in the flat land
 and cannot efficiently deal with hierarchical nodes, flatten all the superNodes that there
 may be by plugging in their nested graph contents into the base graph.
Flatten Graph Since dependencies calculation needs to see all possible operation nodes in the flat land and cannot efficiently deal with hierarchical nodes flatten all the superNodes that there may be by plugging in their nested graph contents into the base graph .
// check dirty and re-determine graph order