vpr/src/device/rr_graph_obj_util.cpp
/*********************************************************************
 * Like the RRGraph.find_node() but returns all matching nodes,
 * rather than just the first. This is particularly useful for getting all instances
 * of a specific IPIN/OPIN at a specific grid tile (x,y) location.
 **********************************************************************/
Like the RRGraph.find_node() but returns all matching nodes,
rather than just the first. This is particularly useful for getting all instances
of a specific IPIN/OPIN at a specific grid tile (x,y) location.
Like the RRGraph . find_node () but returns all matching nodes rather than just the first . This is particularly useful for getting all instances of a specific IPIN / OPIN at a specific grid tile ( x y ) location .
std::vector<RRNodeId> find_rr_graph_nodes(const RRGraph& rr_graph,
                                          const int& x,
                                          const int& y,
                                          const t_rr_type& rr_type,
                                          const int& ptc) {
    std::vector<RRNodeId> indices;
    if (rr_type == IPIN || rr_type == OPIN) {
        for (e_side side : SIDES) {
            RRNodeId rr_node_index = rr_graph.find_node(x, y, rr_type, ptc, side);
            if (rr_node_index != RRNodeId::INVALID()) {
                indices.push_back(rr_node_index);
            }
        }
    } else {
        RRNodeId rr_node_index = rr_graph.find_node(x, y, rr_type, ptc);
        if (rr_node_index != RRNodeId::INVALID()) {
            indices.push_back(rr_node_index);
        }
    }
    return indices;
}
std :: vector < RRNodeId > find_rr_graph_nodes ( const RRGraph & rr_graph , const int & x , const int & y , const t_rr_type & rr_type , const int & ptc ) { std :: vector < RRNodeId > indices ; if ( rr_type == IPIN || rr_type == OPIN ) { for ( e_side side : SIDES ) { RRNodeId rr_node_index = rr_graph . find_node ( x , y , rr_type , ptc , side ) ; if ( rr_node_index != RRNodeId :: INVALID ( ) ) { indices . push_back ( rr_node_index ) ; } } } else { RRNodeId rr_node_index = rr_graph . find_node ( x , y , rr_type , ptc ) ; if ( rr_node_index != RRNodeId :: INVALID ( ) ) { indices . push_back ( rr_node_index ) ; } } return indices ; }
Like the RRGraph.find_node() but returns all matching nodes,
 rather than just the first.
Like the RRGraph . find_node () but returns all matching nodes rather than just the first .
//For pins we need to look at all the sides of the current grid tile //Sides do not effect non-pins so there should only be one per ptc