1616 * Used to index into a map which specifies which destination wire segments this source wire should
1717 * connect to.
1818 */
19- class Switchblock_Lookup {
19+ class SwitchblockLookupKey {
2020 public:
2121 int x_coord; // /< x coordinate of switchblock connection
2222 int y_coord; // /< y coordinate of switchblock connection
@@ -25,17 +25,17 @@ class Switchblock_Lookup {
2525 e_side to_side; // /< destination side of switchblock connection
2626
2727 // / @brief Empty constructor initializes everything to 0
28- Switchblock_Lookup () {
28+ SwitchblockLookupKey () {
2929 x_coord = y_coord = layer_coord = -1 ; // TODO: use set function
3030 }
3131
3232 // / @brief Constructor for initializing member variables
33- Switchblock_Lookup (int set_x, int set_y, int set_layer, e_side set_from, e_side set_to) {
33+ SwitchblockLookupKey (int set_x, int set_y, int set_layer, e_side set_from, e_side set_to) {
3434 this ->set_coords (set_x, set_y, set_layer, set_from, set_to);
3535 }
3636
3737 // / @brief Constructor for initializing member variables with default layer number (0), used for single die FPGA
38- Switchblock_Lookup (int set_x, int set_y, e_side set_from, e_side set_to) {
38+ SwitchblockLookupKey (int set_x, int set_y, e_side set_from, e_side set_to) {
3939 this ->set_coords (set_x, set_y, 0 , set_from, set_to);
4040 }
4141
@@ -49,7 +49,7 @@ class Switchblock_Lookup {
4949 }
5050
5151 // / @brief Overload == operator which is used by std::unordered_map
52- bool operator ==(const Switchblock_Lookup & obj) const {
52+ bool operator ==(const SwitchblockLookupKey & obj) const {
5353 bool result;
5454 if (x_coord == obj.x_coord && y_coord == obj.y_coord
5555 && from_side == obj.from_side && to_side == obj.to_side
@@ -63,7 +63,7 @@ class Switchblock_Lookup {
6363};
6464
6565struct t_hash_Switchblock_Lookup {
66- size_t operator ()(const Switchblock_Lookup & obj) const noexcept {
66+ size_t operator ()(const SwitchblockLookupKey & obj) const noexcept {
6767 std::size_t hash = std::hash<int >{}(obj.x_coord );
6868 vtr::hash_combine (hash, obj.y_coord );
6969 vtr::hash_combine (hash, obj.layer_coord );
@@ -106,7 +106,7 @@ struct t_switchblock_edge {
106106 * A matrix specifying connections for all switchblocks in an FPGA would be sparse and possibly very large,
107107 * so we use an unordered map to take advantage of the sparsity.
108108 */
109- typedef std::unordered_map<Switchblock_Lookup , std::vector<t_switchblock_edge>, t_hash_Switchblock_Lookup> t_sb_connection_map;
109+ typedef std::unordered_map<SwitchblockLookupKey , std::vector<t_switchblock_edge>, t_hash_Switchblock_Lookup> t_sb_connection_map;
110110
111111/* *********** Functions ************/
112112
0 commit comments