From 3f6b2ec67c677cf1b1bc7af10b4c12a1a8b60d58 Mon Sep 17 00:00:00 2001 From: Nathan Shreve Date: Wed, 14 Aug 2024 21:43:10 -0400 Subject: [PATCH] Cleaned a few function calls --- vpr/src/route/route_common.h | 27 ++++++++++++------- vpr/src/route/route_tree.h | 2 +- vpr/src/route/router_delay_profiling.cpp | 4 +-- vpr/test/test_connection_router.cpp | 2 +- .../profiling_utils/parse_lookahead_data.py | 3 +-- 5 files changed, 23 insertions(+), 15 deletions(-) diff --git a/vpr/src/route/route_common.h b/vpr/src/route/route_common.h index 7fc1f9f24be..0aa0c3275a2 100644 --- a/vpr/src/route/route_common.h +++ b/vpr/src/route/route_common.h @@ -191,11 +191,15 @@ void add_node_to_heap( float backward_path_delay, float backward_path_congestion, float R_upstream) { - t_heap* hptr = prepare_to_add_node_to_heap( - heap, - rr_node_route_inf, inode, total_cost, - prev_edge, backward_path_cost, backward_path_delay, - backward_path_congestion, R_upstream); + t_heap* hptr = prepare_to_add_node_to_heap(heap, + rr_node_route_inf, + inode, + total_cost, + prev_edge, + backward_path_cost, + backward_path_delay, + backward_path_congestion, + R_upstream); if (hptr) { heap->add_to_heap(hptr); } @@ -215,10 +219,15 @@ void push_back_node( float backward_path_delay, float backward_path_congestion, float R_upstream) { - t_heap* hptr = prepare_to_add_node_to_heap( - heap, - rr_node_route_inf, inode, total_cost, prev_edge, - backward_path_cost, backward_path_delay, backward_path_congestion, R_upstream); + t_heap* hptr = prepare_to_add_node_to_heap(heap, + rr_node_route_inf, + inode, + total_cost, + prev_edge, + backward_path_cost, + backward_path_delay, + backward_path_congestion, + R_upstream); if (hptr) { heap->push_back(hptr); } diff --git a/vpr/src/route/route_tree.h b/vpr/src/route/route_tree.h index 0e7ec8ceaa7..4ef2ee16f12 100644 --- a/vpr/src/route/route_tree.h +++ b/vpr/src/route/route_tree.h @@ -366,7 +366,7 @@ class RouteTree { const t_conn_cost_params cost_params, const Netlist<>& net_list, const ParentNetId& net_id, - const int itry); + const int itry = -1); /** Reload timing values (R_upstream, C_downstream, Tdel). * Can take a RouteTreeNode& to do an incremental update. diff --git a/vpr/src/route/router_delay_profiling.cpp b/vpr/src/route/router_delay_profiling.cpp index e7d28819385..c4445f32c37 100644 --- a/vpr/src/route/router_delay_profiling.cpp +++ b/vpr/src/route/router_delay_profiling.cpp @@ -128,7 +128,7 @@ bool RouterDelayProfiler::calculate_delay(RRNodeId source_node, router_.get_router_lookahead(), cost_params, net_list_, - conn_params.net_id_, 0); + conn_params.net_id_); //find delay *net_delay = rt_node_of_sink->Tdel; @@ -225,7 +225,7 @@ vtr::vector calculate_all_path_delays_from_rr_node(RRNodeId src router.get_router_lookahead(), cost_params, net_list, - conn_params.net_id_, 0); + conn_params.net_id_); VTR_ASSERT(rt_node_of_sink->inode == RRNodeId(sink_rr_node)); diff --git a/vpr/test/test_connection_router.cpp b/vpr/test/test_connection_router.cpp index a0e7cd1b6f3..8d301e881f0 100644 --- a/vpr/test/test_connection_router.cpp +++ b/vpr/test/test_connection_router.cpp @@ -94,7 +94,7 @@ static float do_one_route(RRNodeId source_node, router.get_router_lookahead(), cost_params, net_list, - conn_params.net_id_, 0); + conn_params.net_id_); delay = rt_node_of_sink.value().Tdel; } diff --git a/vtr_flow/scripts/profiling_utils/parse_lookahead_data.py b/vtr_flow/scripts/profiling_utils/parse_lookahead_data.py index 3a49c641c1c..74f6639ee8a 100755 --- a/vtr_flow/scripts/profiling_utils/parse_lookahead_data.py +++ b/vtr_flow/scripts/profiling_utils/parse_lookahead_data.py @@ -1389,8 +1389,7 @@ def main(): q = deque() for func, params in gv.processes: while len(q) >= args.j: - proc = q.popleft() - proc.join() + q.popleft().join() proc = Process(target=func, args=params) proc.start()