Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚨 Fixed compiler warnings #480

Merged
merged 7 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#ifndef FICTION_POST_LAYOUT_OPTIMIZATION_HPP
#define FICTION_POST_LAYOUT_OPTIMIZATION_HPP

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"

#include "fiction/algorithms/path_finding/a_star.hpp"
#include "fiction/algorithms/path_finding/cost.hpp"
#include "fiction/algorithms/path_finding/distance.hpp"
Expand Down Expand Up @@ -1047,4 +1050,6 @@ void post_layout_optimization(const Lyt& lyt, post_layout_optimization_params ps

} // namespace fiction

#pragma GCC diagnostic pop

#endif // FICTION_POST_LAYOUT_OPTIMIZATION_HPP
21 changes: 11 additions & 10 deletions include/fiction/algorithms/physical_design/wiring_reduction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,30 +403,31 @@ create_wiring_reduction_layout(const Lyt& lyt, const uint64_t x_offset = 0, cons
// crossing:
//
// =
auto is_single_wire = [&lyt, &old_coord](const uint64_t x_offset, const uint64_t y_offset)
auto is_single_wire = [&lyt, &old_coord](const uint64_t add_x_offset, const uint64_t add_y_offset)
{
return lyt.is_wire_tile({old_coord.x - x_offset, old_coord.y - y_offset, 0}) &&
!lyt.is_fanout(lyt.get_node({old_coord.x - x_offset, old_coord.y - y_offset, 0}) &&
lyt.is_empty_tile({old_coord.x - x_offset, old_coord.y - y_offset, 1}));
return lyt.is_wire_tile({old_coord.x - add_x_offset, old_coord.y - add_y_offset, 0}) &&
!lyt.is_fanout(lyt.get_node({old_coord.x - add_x_offset, old_coord.y - add_y_offset, 0}) &&
lyt.is_empty_tile({old_coord.x - add_x_offset, old_coord.y - add_y_offset, 1}));
};

// utility function to check for crossings with outgoing wires to the bottom layer:
//
// +→=
// ↓
// =
auto is_crossing = [&lyt, &old_coord](const uint64_t x_offset, const uint64_t y_offset)
auto is_crossing = [&lyt, &old_coord](const uint64_t add_x_offset, const uint64_t add_y_offset)
{
return lyt.has_northern_incoming_signal({old_coord.x - x_offset, old_coord.y - y_offset + 1, 0}) &&
lyt.has_western_incoming_signal({old_coord.x - x_offset + 1, old_coord.y - y_offset, 0});
return lyt.has_northern_incoming_signal(
{old_coord.x - add_x_offset, old_coord.y - add_y_offset + 1, 0}) &&
lyt.has_western_incoming_signal({old_coord.x - add_x_offset + 1, old_coord.y - add_y_offset, 0});
};

// utility function to fully obstruct a coordinate
auto obstruct_coordinate =
[&wiring_reduction_lyt, &new_coord](const uint64_t x_offset, const uint64_t y_offset)
[&wiring_reduction_lyt, &new_coord](const uint64_t add_x_offset, const uint64_t add_y_offset)
{
wiring_reduction_lyt.obstruct_coordinate({new_coord.x - x_offset, new_coord.y - y_offset, 0});
wiring_reduction_lyt.obstruct_coordinate({new_coord.x - x_offset, new_coord.y - y_offset, 1});
wiring_reduction_lyt.obstruct_coordinate({new_coord.x - add_x_offset, new_coord.y - add_y_offset, 0});
wiring_reduction_lyt.obstruct_coordinate({new_coord.x - add_x_offset, new_coord.y - add_y_offset, 1});
};

// handle single input gates and wires
Expand Down
Loading