umd/core/src/compiler/engine-ast/EngineGraph.cpp
vector<engine_ast::Edge *> engine_ast::Graph::siblingDataEdges(engine_ast::Edge* edge)
{
    EdgeSequence es;
    NodeSequence inputNodes = upstreamNodes(edge);

    for (NodeSequenceIterator ni = inputNodes.begin(); ni != inputNodes.end(); ++ni)
    {
        EdgeSequence outputEdges = downstreamDataEdges(*ni);
        for (EdgeSequenceIterator ei = outputEdges.begin(); ei != outputEdges.end(); ++ei)
        {
            if ((*ei) != edge)
            {
                es.push_back(*ei);
            }
        }
    }

    return es;
}
/**
 * We call two data edges to be siblings, if they share same parent/upstream node.
 * returns set of edges that are siblings to given edge.
 * consider below case, with edges
 *   e-0: node-0-->node-2
 *   e-1: node-1-->node-2
 *   e-2: node-1-->node-3
 *
 *           (node-0)    (node-1)
 *                  \    /       \
 *              e-0  \  / e-1     \ e-2
 *                    \/           \
 *                 (node-2)      (node-3)
 *
 *  e-1 and e-2 are siblings while e-0 is not sibling to any other edge.
 **/
We call two data edges to be siblings, if they share same parent/upstream node.
returns set of edges that are siblings to given edge.



e-1 and e-2 are siblings while e-0 is not sibling to any other edge.
We call two data edges to be siblings if they share same parent / upstream node . returns set of edges that are siblings to given edge . e - 1 and e - 2 are siblings while e - 0 is not sibling to any other edge .
vector<engine_ast::Edge *> engine_ast::Graph::siblingDataEdges(engine_ast::Edge* edge)
{
    EdgeSequence es;
    NodeSequence inputNodes = upstreamNodes(edge);
    for (NodeSequenceIterator ni = inputNodes.begin(); ni != inputNodes.end(); ++ni)
    {
        EdgeSequence outputEdges = downstreamDataEdges(*ni);
        for (EdgeSequenceIterator ei = outputEdges.begin(); ei != outputEdges.end(); ++ei)
        {
            if ((*ei) != edge)
            {
                es.push_back(*ei);
            }
        }
    }
    return es;
}
vector < engine_ast :: Edge * > engine_ast :: Graph :: siblingDataEdges ( engine_ast :: Edge * edge ) { EdgeSequence es ; NodeSequence inputNodes = upstreamNodes ( edge ) ; for ( NodeSequenceIterator ni = inputNodes . begin ( ) ; ni != inputNodes . end ( ) ; ++ ni ) { EdgeSequence outputEdges = downstreamDataEdges ( * ni ) ; for ( EdgeSequenceIterator ei = outputEdges . begin ( ) ; ei != outputEdges . end ( ) ; ++ ei ) { if ( ( * ei ) != edge ) { es . push_back ( * ei ) ; } } } return es ; }
We call two data edges to be siblings, if they share same parent/upstream node.
We call two data edges to be siblings if they share same parent / upstream node .