From e260ac33abdd175f38ea5d8367c52a154b486648 Mon Sep 17 00:00:00 2001 From: gatecat Date: Wed, 7 Dec 2022 10:00:53 +0100 Subject: refactor: ArcBounds -> BoundingBox Signed-off-by: gatecat --- common/route/router2.cc | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'common/route') diff --git a/common/route/router2.cc b/common/route/router2.cc index ed1a6fe0..cdd98b6e 100644 --- a/common/route/router2.cc +++ b/common/route/router2.cc @@ -51,7 +51,7 @@ struct Router2 struct PerArcData { WireId sink_wire; - ArcBounds bb; + BoundingBox bb; bool routed = false; }; @@ -62,7 +62,7 @@ struct Router2 WireId src_wire; dict> wires; std::vector> arcs; - ArcBounds bb; + BoundingBox bb; // Coordinates of the center of the net, used for the weight-to-average int cx, cy, hpwl; int total_route_us = 0; @@ -206,7 +206,7 @@ struct Router2 } } - ArcBounds wire_loc = ctx->getRouteBoundingBox(wire, wire); + BoundingBox wire_loc = ctx->getRouteBoundingBox(wire, wire); pwd.x = (wire_loc.x0 + wire_loc.x1) / 2; pwd.y = (wire_loc.y0 + wire_loc.y1) / 2; @@ -249,7 +249,7 @@ struct Router2 }; }; - bool hit_test_pip(ArcBounds &bb, Loc l) { return l.x >= bb.x0 && l.x <= bb.x1 && l.y >= bb.y0 && l.y <= bb.y1; } + bool hit_test_pip(BoundingBox &bb, Loc l) { return l.x >= bb.x0 && l.x <= bb.x1 && l.y >= bb.y0 && l.y <= bb.y1; } double curr_cong_weight, hist_cong_weight, estimate_weight; @@ -269,7 +269,7 @@ struct Router2 std::vector dirty_wires; // Thread bounding box - ArcBounds bb; + BoundingBox bb; DeterministicRNG rng; @@ -1217,7 +1217,7 @@ struct Router2 if (route_queue.size() < 200) { ThreadContext st; st.rng.rngseed(ctx->rng64()); - st.bb = ArcBounds(0, 0, std::numeric_limits::max(), std::numeric_limits::max()); + st.bb = BoundingBox(0, 0, std::numeric_limits::max(), std::numeric_limits::max()); for (size_t j = 0; j < route_queue.size(); j++) { route_net(st, nets_by_udata[route_queue[j]], false); } @@ -1234,19 +1234,19 @@ struct Router2 int le_y = mid_y; int rs_y = mid_y; // Set up thread bounding boxes - tcs.at(0).bb = ArcBounds(0, 0, mid_x, mid_y); - tcs.at(1).bb = ArcBounds(mid_x + 1, 0, std::numeric_limits::max(), le_y); - tcs.at(2).bb = ArcBounds(0, mid_y + 1, mid_x, std::numeric_limits::max()); + tcs.at(0).bb = BoundingBox(0, 0, mid_x, mid_y); + tcs.at(1).bb = BoundingBox(mid_x + 1, 0, std::numeric_limits::max(), le_y); + tcs.at(2).bb = BoundingBox(0, mid_y + 1, mid_x, std::numeric_limits::max()); tcs.at(3).bb = - ArcBounds(mid_x + 1, mid_y + 1, std::numeric_limits::max(), std::numeric_limits::max()); + BoundingBox(mid_x + 1, mid_y + 1, std::numeric_limits::max(), std::numeric_limits::max()); - tcs.at(4).bb = ArcBounds(0, 0, std::numeric_limits::max(), mid_y); - tcs.at(5).bb = ArcBounds(0, mid_y + 1, std::numeric_limits::max(), std::numeric_limits::max()); + tcs.at(4).bb = BoundingBox(0, 0, std::numeric_limits::max(), mid_y); + tcs.at(5).bb = BoundingBox(0, mid_y + 1, std::numeric_limits::max(), std::numeric_limits::max()); - tcs.at(6).bb = ArcBounds(0, 0, mid_x, std::numeric_limits::max()); - tcs.at(7).bb = ArcBounds(mid_x + 1, 0, std::numeric_limits::max(), std::numeric_limits::max()); + tcs.at(6).bb = BoundingBox(0, 0, mid_x, std::numeric_limits::max()); + tcs.at(7).bb = BoundingBox(mid_x + 1, 0, std::numeric_limits::max(), std::numeric_limits::max()); - tcs.at(8).bb = ArcBounds(0, 0, std::numeric_limits::max(), std::numeric_limits::max()); + tcs.at(8).bb = BoundingBox(0, 0, std::numeric_limits::max(), std::numeric_limits::max()); for (auto n : route_queue) { auto &nd = nets.at(n); -- cgit v1.2.3