From 1e8840b0f9400a1dc17ba6c7496314f82f0db2e1 Mon Sep 17 00:00:00 2001 From: David Shah Date: Sat, 23 Jun 2018 16:12:52 +0200 Subject: Update from increased clangformat line length Signed-off-by: David Shah --- common/design_utils.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'common/design_utils.h') diff --git a/common/design_utils.h b/common/design_utils.h index 13e4ec1d..cb802a1a 100644 --- a/common/design_utils.h +++ b/common/design_utils.h @@ -32,8 +32,7 @@ Utilities for design manipulation, intended for use inside packing algorithms */ // Disconnect a net (if connected) from old, and connect it to rep -void replace_port(CellInfo *old_cell, IdString old_name, CellInfo *rep_cell, - IdString rep_name); +void replace_port(CellInfo *old_cell, IdString old_name, CellInfo *rep_cell, IdString rep_name); // If a net drives a given port of a cell matching a predicate (in many // cases more than one cell type, e.g. SB_DFFxx so a predicate is used), return @@ -41,8 +40,7 @@ void replace_port(CellInfo *old_cell, IdString old_name, CellInfo *rep_cell, // true, then this cell must be the only load. If ignore_cell is set, that cell // is not considered template -CellInfo *net_only_drives(const Context *ctx, NetInfo *net, F1 cell_pred, - IdString port, bool exclusive = false, +CellInfo *net_only_drives(const Context *ctx, NetInfo *net, F1 cell_pred, IdString port, bool exclusive = false, CellInfo *exclude = nullptr) { if (net == nullptr) @@ -56,16 +54,13 @@ CellInfo *net_only_drives(const Context *ctx, NetInfo *net, F1 cell_pred, return nullptr; } else if (net->users.size() == 2) { if (std::find_if(net->users.begin(), net->users.end(), - [exclude](const PortRef &ref) { - return ref.cell == exclude; - }) == net->users.end()) + [exclude](const PortRef &ref) { return ref.cell == exclude; }) == net->users.end()) return nullptr; } } } for (const auto &load : net->users) { - if (load.cell != exclude && cell_pred(ctx, load.cell) && - load.port == port) { + if (load.cell != exclude && cell_pred(ctx, load.cell) && load.port == port) { return load.cell; } } @@ -74,9 +69,7 @@ CellInfo *net_only_drives(const Context *ctx, NetInfo *net, F1 cell_pred, // If a net is driven by a given port of a cell matching a predicate, return // that cell, otherwise nullptr -template -CellInfo *net_driven_by(const Context *ctx, const NetInfo *net, F1 cell_pred, - IdString port) +template CellInfo *net_driven_by(const Context *ctx, const NetInfo *net, F1 cell_pred, IdString port) { if (net == nullptr) return nullptr; -- cgit v1.2.3