diff options
Diffstat (limited to 'common')
| -rw-r--r-- | common/log.cc | 9 | ||||
| -rw-r--r-- | common/place_common.cc | 3 | ||||
| -rw-r--r-- | common/placer1.cc | 14 | ||||
| -rw-r--r-- | common/settings.h | 4 | 
4 files changed, 19 insertions, 11 deletions
| diff --git a/common/log.cc b/common/log.cc index 3ae553e9..6b2d6065 100644 --- a/common/log.cc +++ b/common/log.cc @@ -177,7 +177,8 @@ void log_always(const char *format, ...)  void log(const char *format, ...)  { -    if (log_quiet_warnings) return; +    if (log_quiet_warnings) +        return;      va_list ap;      va_start(ap, format);      logv(format, ap); @@ -186,7 +187,8 @@ void log(const char *format, ...)  void log_info(const char *format, ...)  { -    if (log_quiet_warnings) return; +    if (log_quiet_warnings) +        return;      va_list ap;      va_start(ap, format);      logv_info(format, ap); @@ -233,7 +235,8 @@ void log_cmd_error(const char *format, ...)  void log_break()  { -    if (log_quiet_warnings) return; +    if (log_quiet_warnings) +        return;      if (log_newline_count < 2)          log_always("\n");      if (log_newline_count < 2) diff --git a/common/place_common.cc b/common/place_common.cc index 5cdb96ef..120e5e00 100644 --- a/common/place_common.cc +++ b/common/place_common.cc @@ -329,7 +329,8 @@ class ConstraintLegaliseWorker                  yRootSearch = IncreasingDiameterSearch(cell->constr_y);              if (cell->constr_z == cell->UNCONSTR) -                zRootSearch = IncreasingDiameterSearch(currentLoc.z, 0, ctx->getTileBelDimZ(currentLoc.x, currentLoc.y)); +                zRootSearch = +                        IncreasingDiameterSearch(currentLoc.z, 0, ctx->getTileBelDimZ(currentLoc.x, currentLoc.y));              else                  zRootSearch = IncreasingDiameterSearch(cell->constr_z);              while (!xRootSearch.done()) { diff --git a/common/placer1.cc b/common/placer1.cc index 363b4d58..01f822a5 100644 --- a/common/placer1.cc +++ b/common/placer1.cc @@ -81,7 +81,8 @@ class SAPlacer          }      } -    ~SAPlacer() { +    ~SAPlacer() +    {          for (auto &net : ctx->nets)              net.second->udata = old_udata[net.second->udata];      } @@ -351,7 +352,7 @@ class SAPlacer      // Attempt a SA position swap, return true on success or false on failure      bool try_swap_position(CellInfo *cell, BelId newBel)      { -        static std::vector<NetInfo*> updates; +        static std::vector<NetInfo *> updates;          updates.clear();          BelId oldBel = cell->bel;          CellInfo *other_cell = ctx->getBoundBelCell(newBel); @@ -371,7 +372,8 @@ class SAPlacer          for (const auto &port : cell->ports) {              if (port.second.net != nullptr) {                  auto &cost = costs[port.second.net->udata]; -                if (cost.new_cost == 0) continue; +                if (cost.new_cost == 0) +                    continue;                  cost.new_cost = 0;                  updates.emplace_back(port.second.net);              } @@ -381,7 +383,8 @@ class SAPlacer              for (const auto &port : other_cell->ports)                  if (port.second.net != nullptr) {                      auto &cost = costs[port.second.net->udata]; -                    if (cost.new_cost == 0) continue; +                    if (cost.new_cost == 0) +                        continue;                      cost.new_cost = 0;                      updates.emplace_back(port.second.net);                  } @@ -483,7 +486,8 @@ class SAPlacer      const float post_legalise_dia_scale = 1.5;      Placer1Cfg cfg; -    struct CostChange { +    struct CostChange +    {          wirelen_t curr_cost;          wirelen_t new_cost;      }; diff --git a/common/settings.h b/common/settings.h index e1f1166a..0c4a67db 100644 --- a/common/settings.h +++ b/common/settings.h @@ -38,7 +38,7 @@ class Settings              if (!pair.second) {                  return boost::lexical_cast<T>(pair.first->second);              } -             +          } catch (boost::bad_lexical_cast &) {              log_error("Problem reading setting %s, using default value\n", name);          } @@ -51,7 +51,7 @@ class Settings          auto pair = ctx->settings.emplace(id, std::to_string(value));          if (!pair.second) {              ctx->settings[pair.first->first] = value; -        }         +        }      }    private: | 
