Skip to content

Commit

Permalink
Merge pull request #6427 from The-OpenROAD-Project-staging/par-misc-i…
Browse files Browse the repository at this point in the history
…nclude-cleaner

par: fix clang-tidy misc-include-cleaner
  • Loading branch information
maliberty authored Dec 25, 2024
2 parents 8603ef1 + 3f9e6fb commit ffb0ae8
Show file tree
Hide file tree
Showing 28 changed files with 186 additions and 59 deletions.
4 changes: 2 additions & 2 deletions src/par/include/par/PartitionMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
#pragma once

#include <map>
#include <memory>
#include <random>
#include <set>
#include <string>
#include <vector>

namespace ord {
class dbVerilogNetwork;
Expand Down
14 changes: 8 additions & 6 deletions src/par/src/Coarsener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,17 @@

#include "Coarsener.h"

#include <algorithm>
#include <chrono>
#include <cstdlib>
#include <limits>
#include <map>
#include <memory>
#include <numeric>
#include <random>
#include <set>
#include <utility>
#include <vector>

#include "Evaluator.h"
#include "Hypergraph.h"
Expand Down Expand Up @@ -511,12 +519,6 @@ void Coarsener::VertexMatching(
= hgraph->GetNumVertices() + cluster_id - num_visited_vertices;
// check the early-stop condition
if (remaining_vertices <= num_early_stop_visited_vertices) {
int num_visited_vertices_new = 0;
for (auto flag_new : vertex_cluster_id_vec) {
if (flag_new > -1) {
num_visited_vertices_new++;
}
}
v_iter++;
while (v_iter != unvisited.end()) {
const int cur_vertex = *v_iter;
Expand Down
5 changes: 5 additions & 0 deletions src/par/src/Coarsener.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@
// It will accept a HGraphPtr (std::shared_ptr<Hypergraph>) as input
// and return a sequence of coarser hypergraphs

#include <memory>
#include <string>
#include <vector>

#include "Evaluator.h"
#include "Hypergraph.h"
#include "Utilities.h"
#include "utl/Logger.h"

namespace par {
Expand Down
12 changes: 12 additions & 0 deletions src/par/src/Evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,21 @@
///////////////////////////////////////////////////////////////////////////////
#include "Evaluator.h"

#include <algorithm>
#include <boost/range/iterator_range_core.hpp>
#include <cmath>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <limits>
#include <map>
#include <numeric>
#include <ostream>
#include <sstream>
#include <string>
#include <utility>
#include <vector>

#include "Hypergraph.h"
#include "Utilities.h"
Expand Down
7 changes: 5 additions & 2 deletions src/par/src/Evaluator.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@
///////////////////////////////////////////////////////////////////////////////
#pragma once

#include <set>
#include <tuple>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "Hypergraph.h"
#include "Utilities.h"
Expand Down
9 changes: 9 additions & 0 deletions src/par/src/GreedyRefine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@
///////////////////////////////////////////////////////////////////////////////
#include "GreedyRefine.h"

#include <memory>
#include <set>
#include <vector>

#include "Evaluator.h"
#include "Hypergraph.h"
#include "Refiner.h"
#include "Utilities.h"

// ------------------------------------------------------------------------------
// K-way hyperedge greedy refinement
// ------------------------------------------------------------------------------
Expand Down
6 changes: 5 additions & 1 deletion src/par/src/GreedyRefine.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@
///////////////////////////////////////////////////////////////////////////////
#pragma once

#include <set>
#include <memory>
#include <vector>

#include "Evaluator.h"
#include "Hypergraph.h"
#include "Refiner.h"
#include "Utilities.h"

namespace par {

Expand Down
6 changes: 4 additions & 2 deletions src/par/src/Hypergraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@

#include "Hypergraph.h"

#include <iostream>
#include <string>
#include <algorithm>
#include <limits>
#include <set>
#include <vector>

#include "Utilities.h"
#include "utl/Logger.h"
Expand Down
4 changes: 2 additions & 2 deletions src/par/src/Hypergraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
// Rule2 : Each hyperedge can include a vertex at most once.
////////////////////////////////////////////////////////////////////////////////
#pragma once
#include <boost/range/iterator_range.hpp>
#include <functional>
#include <boost/range/iterator_range_core.hpp>
#include <memory>
#include <set>
#include <vector>

Expand Down
10 changes: 10 additions & 0 deletions src/par/src/ILPRefine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@
///////////////////////////////////////////////////////////////////////////////
#include "ILPRefine.h"

#include <map>
#include <set>
#include <vector>

#include "Evaluator.h"
#include "Hypergraph.h"
#include "Refiner.h"
#include "Utilities.h"
#include "utl/Logger.h"

// ------------------------------------------------------------------------------
// ILP-based refinement
// ILP-based hypergraph partitioning cannot optimize path cost
Expand Down
6 changes: 5 additions & 1 deletion src/par/src/ILPRefine.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@
///////////////////////////////////////////////////////////////////////////////
#pragma once

#include <set>
#include <memory>
#include <vector>

#include "Evaluator.h"
#include "Hypergraph.h"
#include "Refiner.h"
#include "Utilities.h"

namespace par {

Expand Down
13 changes: 13 additions & 0 deletions src/par/src/KWayFMRefine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,20 @@
///////////////////////////////////////////////////////////////////////////////
#include "KWayFMRefine.h"

#include <functional>
#include <limits>
#include <memory>
#include <set>
#include <thread>
#include <utility>
#include <vector>

#include "Evaluator.h"
#include "Hypergraph.h"
#include "PriorityQueue.h"
#include "Refiner.h"
#include "Utilities.h"
#include "utl/Logger.h"

// Implement the direct k-way FM refinement
namespace par {
Expand Down
7 changes: 6 additions & 1 deletion src/par/src/KWayFMRefine.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@
///////////////////////////////////////////////////////////////////////////////
#pragma once

#include <set>
#include <memory>
#include <vector>

#include "Evaluator.h"
#include "Hypergraph.h"
#include "Refiner.h"
#include "Utilities.h"
#include "utl/Logger.h"

namespace par {

Expand Down
13 changes: 13 additions & 0 deletions src/par/src/KWayPMRefine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,20 @@
///////////////////////////////////////////////////////////////////////////////
#include "KWayPMRefine.h"

#include <algorithm>
#include <functional>
#include <map>
#include <memory>
#include <thread>
#include <utility>
#include <vector>

#include "Evaluator.h"
#include "Hypergraph.h"
#include "KWayFMRefine.h"
#include "PriorityQueue.h"
#include "Refiner.h"
#include "Utilities.h"

// ------------------------------------------------------------------------------
// K-way pair-wise FM refinement
Expand Down
9 changes: 8 additions & 1 deletion src/par/src/KWayPMRefine.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,16 @@
///////////////////////////////////////////////////////////////////////////////
#pragma once

#include <set>
#include <map>
#include <memory>
#include <utility>
#include <vector>

#include "Evaluator.h"
#include "Hypergraph.h"
#include "KWayFMRefine.h"
#include "Refiner.h"
#include "Utilities.h"

namespace par {

Expand Down
1 change: 0 additions & 1 deletion src/par/src/MakePartitionMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

#include "par/MakePartitionMgr.h"

#include "odb/db.h"
#include "ord/OpenRoad.hh"
#include "par/PartitionMgr.h"
#include "sta/StaMain.hh"
Expand Down
12 changes: 12 additions & 0 deletions src/par/src/Multilevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,26 @@

#include "Multilevel.h"

#include <algorithm>
#include <boost/range/iterator_range_core.hpp>
#include <functional>
#include <limits>
#include <numeric>
#include <queue>
#include <random>
#include <thread>
#include <utility>
#include <vector>

#include "Coarsener.h"
#include "Evaluator.h"
#include "GreedyRefine.h"
#include "Hypergraph.h"
#include "ILPRefine.h"
#include "KWayFMRefine.h"
#include "KWayPMRefine.h"
#include "Partitioner.h"
#include "Utilities.h"
#include "utl/Logger.h"

namespace par {
Expand Down
3 changes: 3 additions & 0 deletions src/par/src/Multilevel.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
///////////////////////////////////////////////////////////////////////////////
#pragma once

#include <memory>
#include <vector>

#include "Coarsener.h"
#include "Evaluator.h"
#include "GreedyRefine.h"
Expand Down
11 changes: 9 additions & 2 deletions src/par/src/PartitionMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,24 @@
#include "par/PartitionMgr.h"

#include <algorithm>
#include <chrono>
#include <cmath>
#include <ctime>
#include <fstream>
#include <iostream>
#include <map>
#include <memory>
#include <set>
#include <stdexcept>
#include <string>
#include <vector>

#include "TritonPart.h"
#include "Utilities.h"
#include "db_sta/dbSta.hh"
#include "odb/db.h"
#include "sta/ConcreteNetwork.hh"
#include "sta/Liberty.hh"
#include "sta/MakeConcreteNetwork.hh"
#include "sta/NetworkClass.hh"
#include "sta/ParseBus.hh"
#include "sta/PortDirection.hh"
#include "sta/VerilogWriter.hh"
Expand Down
6 changes: 6 additions & 0 deletions src/par/src/Partitioner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@

#include "Partitioner.h"

#include <algorithm>
#include <map>
#include <numeric>
#include <random>
#include <set>
#include <utility>
#include <vector>

#include "Evaluator.h"
#include "Hypergraph.h"
Expand Down
3 changes: 3 additions & 0 deletions src/par/src/Partitioner.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
// then put remaining vertices into the first block 3) ILP-based Partitioning
// (INIT_DIRECT_ILP)

#include <memory>
#include <vector>

#include "Evaluator.h"
#include "Hypergraph.h"
#include "Utilities.h"
Expand Down
5 changes: 5 additions & 0 deletions src/par/src/PriorityQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@

#include "PriorityQueue.h"

#include <algorithm>
#include <memory>
#include <utility>

#include "Hypergraph.h"
#include "Utilities.h"

namespace par {

Expand Down
7 changes: 6 additions & 1 deletion src/par/src/PriorityQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@
///////////////////////////////////////////////////////////////////////////////
#pragma once

#include <set>
#include <cmath>
#include <limits>
#include <map>
#include <memory>
#include <vector>

#include "Hypergraph.h"
#include "Utilities.h"

namespace par {

Expand Down
6 changes: 6 additions & 0 deletions src/par/src/Refiner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
///////////////////////////////////////////////////////////////////////////////
#include "Refiner.h"

#include <map>
#include <memory>
#include <set>
#include <utility>
#include <vector>

#include "Evaluator.h"
#include "Hypergraph.h"
#include "Utilities.h"
Expand Down
Loading

0 comments on commit ffb0ae8

Please sign in to comment.