Skip to content

Commit 9d95cd3

Browse files
committed
mpl: clang-tidy and format
Signed-off-by: Arthur Koucher <[email protected]>
1 parent f734be7 commit 9d95cd3

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

src/mpl/src/SimulatedAnnealingCore.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ class SimulatedAnnealingCore
135135
virtual void calPenalty() = 0;
136136
void calOutlinePenalty();
137137
void calWirelength();
138-
void addClosestAvailableRegionDistToWL(const T& macro,
139-
float net_weight);
138+
void addClosestAvailableRegionDistToWL(const T& macro, float net_weight);
140139
bool isOutsideTheOutline(const T& macro) const;
141140
float computeDistance(const Point& a, const Point& b) const;
142141
void calGuidancePenalty();

src/mpl/src/clusterEngine.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,7 @@ void ClusteringEngine::createIOClusters()
405405

406406
Cluster* ClusteringEngine::findIOClusterWithSameConstraint(odb::dbBTerm* bterm)
407407
{
408-
for (const auto& [cluster, cluster_constraint] :
409-
io_cluster_and_region_list_) {
408+
for (const auto& [cluster, cluster_constraint] : unplaced_ios_to_region_) {
410409
if (bterm->getConstraintRegion() == cluster_constraint) {
411410
return cluster;
412411
}
@@ -438,7 +437,7 @@ void ClusteringEngine::createClusterOfUnplacedIOs(odb::dbBTerm* bterm)
438437
block_->dbuToMicrons(constraint_shape.dx()),
439438
block_->dbuToMicrons(constraint_shape.dy()));
440439

441-
io_cluster_and_region_list_.push_back({cluster.get(), constraint_shape});
440+
unplaced_ios_to_region_[cluster.get()] = constraint_shape;
442441

443442
tree_->maps.bterm_to_cluster_id[bterm] = id_;
444443
tree_->maps.id_to_cluster[id_++] = cluster.get();

src/mpl/src/clusterEngine.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ class ClusteringEngine
185185

186186
private:
187187
using UniqueClusterQueue = std::queue<std::unique_ptr<Cluster>>;
188-
using IOClusterAndRegion = std::pair<Cluster*, odb::Rect>;
189188

190189
void init();
191190
Metrics* computeModuleMetrics(odb::dbModule* module);
@@ -288,7 +287,7 @@ class ClusteringEngine
288287
PhysicalHierarchy* tree_{nullptr};
289288

290289
// Only for clusters of unplaced IOs.
291-
std::vector<IOClusterAndRegion> io_cluster_and_region_list_;
290+
std::map<Cluster*, odb::Rect> unplaced_ios_to_region_;
292291

293292
int level_{0}; // Current level
294293
int id_{0}; // Current "highest" id

src/mpl/src/hier_rtlmp.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3236,10 +3236,11 @@ Pusher::Pusher(utl::Logger* logger,
32363236
void Pusher::setIOBlockages(const std::vector<Rect>& io_blockages)
32373237
{
32383238
for (const Rect& blockage : io_blockages) {
3239-
io_blockages_.push_back(odb::Rect(block_->micronsToDbu(blockage.xMin()),
3240-
block_->micronsToDbu(blockage.yMin()),
3241-
block_->micronsToDbu(blockage.xMax()),
3242-
block_->micronsToDbu(blockage.yMax())));
3239+
io_blockages_.emplace_back(
3240+
odb::Rect(block_->micronsToDbu(blockage.xMin()),
3241+
block_->micronsToDbu(blockage.yMin()),
3242+
block_->micronsToDbu(blockage.xMax()),
3243+
block_->micronsToDbu(blockage.yMax())));
32433244
}
32443245
}
32453246

src/mpl/src/hier_rtlmp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ class HierRTLMP
181181
void createPinAccessBlockages();
182182
bool treeHasOnlyUnconstrainedIOs();
183183
std::vector<Cluster*> getClustersOfUnplacedIOPins();
184-
void createPinAccessBlockage(const Rect& micron_region, const float depth);
185-
float computePinAccessBaseDepth(const float io_span);
184+
void createPinAccessBlockage(const Rect& micron_region, float depth);
185+
float computePinAccessBaseDepth(float io_span);
186186
BoundaryToRegionsMap getBoundaryToBlockedRegionsMap(
187187
const std::vector<odb::Rect>& blocked_regions_for_pins);
188188
std::vector<odb::Rect> computeAvailableRegions(

0 commit comments

Comments
 (0)