vpr/src/route/router_lookahead_map.cpp
/* iterates over the children of the specified node and selectively pushes them onto the priority queue */
iterates over the children of the specified node and selectively pushes them onto the priority queue
iterates over the children of the specified node and selectively pushes them onto the priority queue
static void expand_dijkstra_neighbours(PQ_Entry parent_entry, vtr::vector<RRNodeId, float>& node_visited_costs, vtr::vector<RRNodeId, bool>& node_expanded, std::priority_queue<PQ_Entry>& pq) {
    auto& device_ctx = g_vpr_ctx.device();
    RRNodeId parent_ind = parent_entry.rr_node_ind;
    for (const RREdgeId& iedge : device_ctx.rr_graph.node_out_edges(parent_ind)) {
        RRNodeId child_node_ind = device_ctx.rr_graph.edge_sink_node(iedge);
        int switch_ind = (int)size_t(device_ctx.rr_graph.edge_switch(iedge));
        if (node_expanded[child_node_ind]) {
            continue;
        }
        PQ_Entry child_entry(child_node_ind, switch_ind, parent_entry.delay,
                             parent_entry.R_upstream, parent_entry.congestion_upstream, false);
        if (node_visited_costs[child_node_ind] >= 0 && node_visited_costs[child_node_ind] < child_entry.cost) {
            continue;
        }
        node_visited_costs[child_node_ind] = child_entry.cost;
        pq.push(child_entry);
    }
}
static void expand_dijkstra_neighbours ( PQ_Entry parent_entry , vtr :: vector < RRNodeId , float > & node_visited_costs , vtr :: vector < RRNodeId , bool > & node_expanded , std :: priority_queue < PQ_Entry > & pq ) { auto & device_ctx = g_vpr_ctx . device ( ) ; RRNodeId parent_ind = parent_entry . rr_node_ind ; for ( const RREdgeId & iedge : device_ctx . rr_graph . node_out_edges ( parent_ind ) ) { RRNodeId child_node_ind = device_ctx . rr_graph . edge_sink_node ( iedge ) ; int switch_ind = ( int ) size_t ( device_ctx . rr_graph . edge_switch ( iedge ) ) ; if ( node_expanded [ child_node_ind ] ) { continue ; } PQ_Entry child_entry ( child_node_ind , switch_ind , parent_entry . delay , parent_entry . R_upstream , parent_entry . congestion_upstream , false ) ; if ( node_visited_costs [ child_node_ind ] >= 0 && node_visited_costs [ child_node_ind ] < child_entry . cost ) { continue ; } node_visited_costs [ child_node_ind ] = child_entry . cost ; pq . push ( child_entry ) ; } }
iterates over the children of the specified node and selectively pushes them onto the priority queue
iterates over the children of the specified node and selectively pushes them onto the priority queue
/* skip this child if it has already been expanded from */ //VTR_ASSERT(child_entry.cost >= 0); //Asertion fails in practise. TODO: debug /* skip this child if it has been visited with smaller cost */ /* finally, record the cost with which the child was visited and put the child entry on the queue */