Skip to content

Commit 3833a6a

Browse files
committed
psm: use boost geom point
Signed-off-by: Peter Gadfort <peter.gadfort@gmail.com>
1 parent 16ed5c9 commit 3833a6a

3 files changed

Lines changed: 3 additions & 8 deletions

File tree

src/psm/src/ir_network.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,9 +709,9 @@ std::set<Node*> IRNetwork::getSharedShapeNodes() const
709709
const auto layer_shapes = getShapeTree(layer);
710710

711711
for (const auto& node : nodes) {
712-
const Point pt(node->getPoint().x(), node->getPoint().y());
713712
const auto shapes = std::distance(
714-
layer_shapes.qbegin(boost::geometry::index::intersects(pt)),
713+
layer_shapes.qbegin(
714+
boost::geometry::index::intersects(node->getPoint())),
715715
layer_shapes.qend());
716716
if (shapes > 1) {
717717
shared_nodes.insert(node.get());

src/psm/src/ir_network.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ class IRNetwork
4545
template <typename T>
4646
using LayerMap = std::map<odb::dbTechLayer*, T>;
4747

48-
using Point
49-
= boost::geometry::model::d2::point_xy<int,
50-
boost::geometry::cs::cartesian>;
51-
5248
using TerminalTree
5349
= boost::geometry::index::rtree<TerminalNode*,
5450
boost::geometry::index::quadratic<16>,

src/psm/src/shape.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,14 @@ Connections Shape::connectNodes(const IRNetwork::NodeTree& layer_nodes)
4444

4545
for (auto* node : sorted_nodes) {
4646
const auto& pt = node->getPoint();
47-
const IRNetwork::Point point(pt.x(), pt.y());
4847

4948
std::vector<Node*> ordered_neighbors;
5049

5150
used.insert(node);
5251

5352
tree.query(boost::geometry::index::satisfies([&](const auto value) {
5453
return used.find(value) == used.end();
55-
}) && boost::geometry::index::nearest(point, 1),
54+
}) && boost::geometry::index::nearest(pt, 1),
5655
std::back_inserter(ordered_neighbors));
5756

5857
for (Node* other : ordered_neighbors) {

0 commit comments

Comments
 (0)