@@ -38,7 +38,7 @@ void get_segment_usage_stats(std::vector<t_segment_inf>& segment_inf) {
38
38
{X_AXIS, std::map<int , int >()},
39
39
{Y_AXIS, std::map<int , int >()}};
40
40
41
- std::set<int > segment_lengths;
41
+ std::set<int , std::less< int > > segment_lengths;
42
42
for (const auto & seg_inf: segment_inf) {
43
43
int seg_length = seg_inf.longline ? LONGLINE : seg_inf.length ;
44
44
@@ -83,7 +83,7 @@ void get_segment_usage_stats(std::vector<t_segment_inf>& segment_inf) {
83
83
VTR_LOG (" \n " );
84
84
VTR_LOG (" Total Number of Wiring Segments by Direction: direction length number\n " );
85
85
VTR_LOG (" --------- ------ -------\n " );
86
- for (int length = 0 ; length <= max_segment_length; length++ ) {
86
+ for (auto length : segment_lengths ) {
87
87
for (auto ax : {X_AXIS, Y_AXIS}) {
88
88
std::string ax_name = (ax == X_AXIS) ? " X" : " Y" ;
89
89
if (directed_cap_by_length[ax][length] != 0 ) {
@@ -103,7 +103,7 @@ void get_segment_usage_stats(std::vector<t_segment_inf>& segment_inf) {
103
103
VTR_LOG (" \n " );
104
104
VTR_LOG (" %s - Directed Wiring Segment usage by length: length utilization\n " , ax_name.c_str ());
105
105
VTR_LOG (" ------ -----------\n " );
106
- for (int length = 0 ; length <= max_segment_length; length++ ) {
106
+ for (auto length : segment_lengths ) {
107
107
if (directed_cap_by_length[ax][length] != 0 ) {
108
108
std::string length_str = (length == LONGLINE) ? " longline" : std::to_string (length);
109
109
utilization = (float )directed_occ_by_length[ax][length] / (float )directed_cap_by_length[ax][length];
0 commit comments