From da74a425d23352d7cddf9d1c4b0b7c86dd567c40 Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Mon, 1 Feb 2021 14:28:32 -0800 Subject: Run "make clangformat". Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- generic/arch.h | 36 +++++++++++++----------------------- generic/arch_pybindings.cc | 28 ++++++++++++---------------- 2 files changed, 25 insertions(+), 39 deletions(-) (limited to 'generic') diff --git a/generic/arch.h b/generic/arch.h index 924115a7..f3e26bb5 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -271,40 +271,32 @@ struct Arch : BaseCtx bool place(); bool route(); - std::vector getCellTypes() const { + std::vector getCellTypes() const + { std::vector cell_types; cell_types.reserve(bels.size()); - for(auto bel : bels) { + for (auto bel : bels) { cell_types.push_back(bel.first); } return cell_types; } - std::vector getBelBuckets() const { - return getCellTypes(); - } + std::vector getBelBuckets() const { return getCellTypes(); } - IdString getBelBucketName(BelBucketId bucket) const { - return bucket; - } + IdString getBelBucketName(BelBucketId bucket) const { return bucket; } - BelBucketId getBelBucketByName(IdString bucket) const { - return bucket; - } + BelBucketId getBelBucketByName(IdString bucket) const { return bucket; } - BelBucketId getBelBucketForBel(BelId bel) const { - return getBelType(bel); - } + BelBucketId getBelBucketForBel(BelId bel) const { return getBelType(bel); } - BelBucketId getBelBucketForCellType(IdString cell_type) const { - return cell_type; - } + BelBucketId getBelBucketForCellType(IdString cell_type) const { return cell_type; } - std::vector getBelsInBucket(BelBucketId bucket) const { + std::vector getBelsInBucket(BelBucketId bucket) const + { std::vector bels; - for(BelId bel : getBels()) { - if(bucket == getBelBucketForBel(bel)) { + for (BelId bel : getBels()) { + if (bucket == getBelBucketForBel(bel)) { bels.push_back(bel); } } @@ -323,9 +315,7 @@ struct Arch : BaseCtx // Get the TimingClockingInfo of a port TimingClockingInfo getPortClockingInfo(const CellInfo *cell, IdString port, int index) const; - bool isValidBelForCellType(IdString cell_type, BelId bel) const { - return cell_type == getBelType(bel); - } + bool isValidBelForCellType(IdString cell_type, BelId bel) const { return cell_type == getBelType(bel); } bool isValidBelForCell(CellInfo *cell, BelId bel) const; bool isBelLocationValid(BelId bel) const; diff --git a/generic/arch_pybindings.cc b/generic/arch_pybindings.cc index 9e98bfe5..23f2c05c 100644 --- a/generic/arch_pybindings.cc +++ b/generic/arch_pybindings.cc @@ -227,30 +227,26 @@ void arch_wrap_python(py::module &m) "clock"_a, "clktoq"_a); // const\_range\ getBelBuckets() const - fn_wrapper_0a &>>::def_wrap(ctx_cls, "getBelBuckets"); + fn_wrapper_0a &>>::def_wrap(ctx_cls, "getBelBuckets"); // BelBucketId getBelBucketForBel(BelId bel) const - fn_wrapper_1a, - conv_from_str>::def_wrap(ctx_cls, "getBelBucketForBel"); + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getBelBucketForBel"); // BelBucketId getBelBucketForCellType(IdString cell\_type) const - fn_wrapper_1a, - conv_from_str>::def_wrap(ctx_cls, "getBelBucketForCellType"); + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getBelBucketForCellType"); // const\_range\ getBelsInBucket(BelBucketId bucket) const - fn_wrapper_1a &>, - conv_from_str>::def_wrap(ctx_cls, "getBelsInBucket"); + fn_wrapper_1a &>, conv_from_str>::def_wrap(ctx_cls, + "getBelsInBucket"); // bool isValidBelForCellType(IdString cell\_type, BelId bel) const - fn_wrapper_2a, - conv_from_str, conv_from_str>::def_wrap( - ctx_cls, "isValidBelForCellType"); + fn_wrapper_2a, conv_from_str, conv_from_str>::def_wrap(ctx_cls, + "isValidBelForCellType"); WRAP_MAP_UPTR(m, CellMap, "IdCellMap"); WRAP_MAP_UPTR(m, NetMap, "IdNetMap"); -- cgit v1.2.3