@@ -35,16 +35,13 @@ class GridGraph
3535 GridGraph (const Design* design, const Constants& constants);
3636 int getLibDBU () const { return lib_dbu_; }
3737 int getM2Pitch () const { return m2_pitch_; }
38- unsigned getNumLayers () const { return num_layers_; }
39- unsigned getSize (unsigned dimension) const
40- {
41- return (dimension ? y_size_ : x_size_);
42- }
38+ int getNumLayers () const { return num_layers_; }
39+ int getSize (int dimension) const { return (dimension ? y_size_ : x_size_); }
4340 std::string getLayerName (int layer_index) const
4441 {
4542 return layer_names_[layer_index];
4643 }
47- unsigned getLayerDirection (int layer_index) const
44+ int getLayerDirection (int layer_index) const
4845 {
4946 return layer_directions_[layer_index];
5047 }
@@ -58,7 +55,7 @@ class GridGraph
5855 {
5956 return (uint64_t ) x * y_size_ + y;
6057 }
61- int getGridline (const unsigned dimension, const int index) const
58+ int getGridline (const int dimension, const int index) const
6259 {
6360 return gridlines_[dimension][index];
6461 }
@@ -70,7 +67,7 @@ class GridGraph
7067 }
7168
7269 // Costs
73- int getEdgeLength (unsigned direction, unsigned edge_index) const ;
70+ int getEdgeLength (int direction, int edge_index) const ;
7471 CostT getWireCost (int layer_index, PointT u, PointT v) const ;
7572 CostT getViaCost (int layer_index, PointT loc) const ;
7673 CostT getUnitViaCost () const { return unit_via_cost_; }
@@ -114,13 +111,13 @@ class GridGraph
114111 const int lib_dbu_;
115112 int m2_pitch_;
116113
117- unsigned num_layers_;
118- unsigned x_size_;
119- unsigned y_size_;
114+ int num_layers_;
115+ int x_size_;
116+ int y_size_;
120117 std::vector<std::vector<int >> gridlines_;
121118 std::vector<std::vector<int >> grid_centers_;
122119 std::vector<std::string> layer_names_;
123- std::vector<unsigned > layer_directions_;
120+ std::vector<int > layer_directions_;
124121 std::vector<int > layer_min_lengths_;
125122
126123 // Unit costs
@@ -135,11 +132,10 @@ class GridGraph
135132 // (l, x, y+1)} depending on the routing direction of the layer
136133 Constants constants_;
137134
138- IntervalT rangeSearchGridlines (unsigned dimension,
135+ IntervalT rangeSearchGridlines (int dimension,
139136 const IntervalT& loc_interval) const ;
140137 // Find the gridlines_ within [locInterval.low, locInterval.high]
141- IntervalT rangeSearchRows (unsigned dimension,
142- const IntervalT& loc_interval) const ;
138+ IntervalT rangeSearchRows (int dimension, const IntervalT& loc_interval) const ;
143139 // Find the rows/columns overlapping with [locInterval.low, locInterval.high]
144140
145141 // Utility functions for cost calculation
0 commit comments