Skip to content

Commit 983d642

Browse files
clang-format + cleanup debug code
Signed-off-by: Ravi Varadarajan <[email protected]>
1 parent 04352ca commit 983d642

File tree

2 files changed

+26
-14
lines changed

2 files changed

+26
-14
lines changed

src/mpl2/src/SimulatedAnnealingCore.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,6 @@ void SimulatedAnnealingCore<T>::fastSA()
506506
const float min_t = 1e-10;
507507
const float t_factor
508508
= std::exp(std::log(min_t / init_temperature_) / max_num_step_);
509-
// std::cout << "init_temperature_ " << init_temperature_ << std::endl;
510-
// std::cout << "t_factor = " << t_factor << std::endl;
511509
notch_weight_ = 0.0; // notch pealty is too expensive, we try to avoid
512510
// calculating notch penalty at very beginning
513511
// const for restart

src/mpl2/src/bus_synthesis.cpp

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -559,15 +559,23 @@ void createGraph(std::vector<SoftMacro>& soft_macros, // placed soft macros
559559
edge.length = x_grid[x_idx + 1] - x_grid[x_idx - 1];
560560
// calculate edge type (internal or not)
561561
// and weighted length
562-
std::cout << "src = " << src << " target = " << target << " vertex_list.size() = " << vertex_list.size() << std::endl;
562+
563+
logger->report("src: {}, target: {}, vertex_list size: {}",
564+
src,
565+
target,
566+
vertex_list.size());
567+
563568
const int& src_macro_id = vertex_list[src].macro_id;
564569
const int& target_macro_id = vertex_list[target].macro_id;
565-
std::cout << "src_macro_id = " << src_macro_id << " "
566-
<< "target_macro_id = " << target_macro_id << " "
567-
<< "soft_macros.size() = " << soft_macros.size() << std::endl;
570+
logger->report(
571+
"src_macro_id: {} target_macro_id: {} num soft macros: {}",
572+
src_macro_id,
573+
target_macro_id,
574+
soft_macros.size());
568575
// this is an edge crossing boundaries
569576
edge.internal = false;
570-
// exception handling. Later we should find better way to handle this. [20221202]
577+
// exception handling. Later we should find better way to handle this.
578+
// [20221202]
571579
if (src_macro_id == -1 && target_macro_id == -1) {
572580
edge.length_w = edge.length;
573581
continue;
@@ -601,9 +609,9 @@ void createGraph(std::vector<SoftMacro>& soft_macros, // placed soft macros
601609
}
602610
}
603611
}
604-
612+
605613
logger->report("finish boundary edges (left and right boundaries)");
606-
614+
607615
// handle the vertices on top or bottom boundaries
608616
for (int y_idx = 1; y_idx < y_grid.size() - 1; y_idx++) {
609617
for (int x_idx = 0; x_idx < x_grid.size(); x_idx++) {
@@ -621,15 +629,21 @@ void createGraph(std::vector<SoftMacro>& soft_macros, // placed soft macros
621629
edge.length = y_grid[y_idx + 1] - y_grid[y_idx - 1];
622630
// calculate edge type (internal or not)
623631
// and weighted length
624-
std::cout << "src = " << src << " target = " << target << " vertex_list.size() = " << vertex_list.size() << std::endl;
632+
logger->report("src: {} target: {} vertex_list size: {}",
633+
src,
634+
target,
635+
vertex_list.size());
625636
const int& src_macro_id = vertex_list[src].macro_id;
626637
const int& target_macro_id = vertex_list[target].macro_id;
627-
std::cout << "src_macro_id = " << src_macro_id << " "
628-
<< "target_macro_id = " << target_macro_id << " "
629-
<< "soft_macros.size() = " << soft_macros.size() << std::endl;
638+
logger->report(
639+
"src_macro_id: {}, target_macro_id: {}, num soft macros: {}",
640+
src_macro_id,
641+
target_macro_id,
642+
soft_macros.size());
630643
// this is an edge crossing boundaries
631644
edge.internal = false;
632-
// exception handling. Later we should find better way to handle this. [20221202]
645+
// exception handling. Later we should find better way to handle this.
646+
// [20221202]
633647
if (src_macro_id == -1 && target_macro_id == -1) {
634648
edge.length_w = edge.length;
635649
continue;

0 commit comments

Comments
 (0)