From fcff203c23ccd4ced76dafe1496b8c83adb88ddc Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 5 Jul 2018 10:13:29 +0200 Subject: [PATCH] typeof to decltype --- common/pybindings.cc | 36 +++++++++---------- common/pycontainers.h | 8 ++--- ice40/arch_pybindings.cc | 76 ++++++++++++++++++++-------------------- 3 files changed, 60 insertions(+), 60 deletions(-) diff --git a/common/pybindings.cc b/common/pybindings.cc index 9bca307c..64055755 100644 --- a/common/pybindings.cc +++ b/common/pybindings.cc @@ -95,50 +95,50 @@ BOOST_PYTHON_MODULE(MODULE_NAME) class_("BaseCtx", no_init); auto ci_cls = class_>("CellInfo", no_init); - readwrite_wrapper, + readwrite_wrapper, conv_from_str>::def_wrap(ci_cls, "name"); - readwrite_wrapper, + readwrite_wrapper, conv_from_str>::def_wrap(ci_cls, "type"); - readonly_wrapper>::def_wrap( + readonly_wrapper>::def_wrap( ci_cls, "attrs"); - readonly_wrapper>::def_wrap( + readonly_wrapper>::def_wrap( ci_cls, "params"); - readonly_wrapper>::def_wrap( + readonly_wrapper>::def_wrap( ci_cls, "ports"); - readwrite_wrapper, + readwrite_wrapper, conv_from_str>::def_wrap(ci_cls, "bel"); - readwrite_wrapper, + readwrite_wrapper, pass_through>::def_wrap(ci_cls, "belStrength"); - readonly_wrapper>::def_wrap(ci_cls, + readonly_wrapper>::def_wrap(ci_cls, "pins"); auto pi_cls = class_>("PortInfo", no_init); - readwrite_wrapper, + readwrite_wrapper, conv_from_str>::def_wrap(pi_cls, "name"); - readonly_wrapper>::def_wrap(pi_cls, + readonly_wrapper>::def_wrap(pi_cls, "net"); - readwrite_wrapper, + readwrite_wrapper, pass_through>::def_wrap(pi_cls, "type"); typedef std::vector PortVector; typedef std::unordered_map WireMap; auto ni_cls = class_>("NetInfo", no_init); - readwrite_wrapper, + readwrite_wrapper, conv_from_str>::def_wrap(ni_cls, "name"); - readwrite_wrapper, + readwrite_wrapper, unwrap_context>::def_wrap(ni_cls, "driver"); - readonly_wrapper>::def_wrap( + readonly_wrapper>::def_wrap( ni_cls, "users"); - readonly_wrapper>::def_wrap(ni_cls, + readonly_wrapper>::def_wrap(ni_cls, "wires"); auto pr_cls = class_>("PortRef", no_init); - readonly_wrapper>::def_wrap(pr_cls, + readonly_wrapper>::def_wrap(pr_cls, "cell"); - readwrite_wrapper, + readwrite_wrapper, conv_from_str>::def_wrap(pr_cls, "port"); - readwrite_wrapper, + readwrite_wrapper, pass_through>::def_wrap(pr_cls, "budget"); def("parse_json", parse_json_shim); diff --git a/common/pycontainers.h b/common/pycontainers.h index f4251558..094706f7 100644 --- a/common/pycontainers.h +++ b/common/pycontainers.h @@ -200,7 +200,7 @@ template struct map_pair_wrapper { if (iter.second == 0) { iter.second++; - return object(PythonConversion::string_converter().to_str( + return object(PythonConversion::string_converter().to_str( iter.first.ctx, iter.first.base.first)); } else if (iter.second == 1) { iter.second++; @@ -233,7 +233,7 @@ template struct map_pair_wrapper static std::string first_getter(wrapped_pair &t) { - return PythonConversion::string_converter().to_str(t.ctx, t.base.first); + return PythonConversion::string_converter().to_str(t.ctx, t.base.first); } static typename value_conv::ret_type second_getter(wrapped_pair &t) { return value_conv()(t.ctx, t.base.second); } @@ -316,7 +316,7 @@ template struct map_pair_wrapper_uptr { if (iter.second == 0) { iter.second++; - return object(PythonConversion::string_converter().to_str( + return object(PythonConversion::string_converter().to_str( iter.first.ctx, iter.first.base.first)); } else if (iter.second == 1) { iter.second++; @@ -350,7 +350,7 @@ template struct map_pair_wrapper_uptr static std::string first_getter(wrapped_pair &t) { - return PythonConversion::string_converter().to_str(t.ctx, t.base.first); + return PythonConversion::string_converter().to_str(t.ctx, t.base.first); } static PythonConversion::ContextualWrapper second_getter(wrapped_pair &t) diff --git a/ice40/arch_pybindings.cc b/ice40/arch_pybindings.cc index 4cbfc8af..67a37983 100644 --- a/ice40/arch_pybindings.cc +++ b/ice40/arch_pybindings.cc @@ -60,93 +60,93 @@ void arch_wrap_python() auto ctx_cls = class_, boost::noncopyable>("Context", no_init) .def("checksum", &Context::checksum); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getBelType"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "checkBelAvail"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getBelChecksum"); - fn_wrapper_3a_v, + fn_wrapper_3a_v, conv_from_str, pass_through>::def_wrap(ctx_cls, "bindBel"); - fn_wrapper_1a_v>::def_wrap( + fn_wrapper_1a_v>::def_wrap( ctx_cls, "unbindBel"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getBoundBelCell"); - fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getConflictingBelCell"); - fn_wrapper_0a>::def_wrap(ctx_cls, + fn_wrapper_0a>::def_wrap(ctx_cls, "getBels"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getBelsAtSameTile"); - fn_wrapper_2a, + fn_wrapper_2a, conv_from_str, conv_from_str>::def_wrap(ctx_cls, "getWireBelPin"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getBelPinUphill"); - fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getBelPinsDownhill"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getWireChecksum"); - fn_wrapper_3a_v, + fn_wrapper_3a_v, conv_from_str, pass_through>::def_wrap(ctx_cls, "bindWire"); - fn_wrapper_1a_v>::def_wrap( + fn_wrapper_1a_v>::def_wrap( ctx_cls, "unbindWire"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "checkWireAvail"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getBoundWireNet"); - fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getConflictingWireNet"); - fn_wrapper_0a>::def_wrap( + fn_wrapper_0a>::def_wrap( ctx_cls, "getWires"); - fn_wrapper_0a>::def_wrap( + fn_wrapper_0a>::def_wrap( ctx_cls, "getPips"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getPipChecksum"); - fn_wrapper_3a_v, + fn_wrapper_3a_v, conv_from_str, pass_through>::def_wrap(ctx_cls, "bindPip"); - fn_wrapper_1a_v>::def_wrap( + fn_wrapper_1a_v>::def_wrap( ctx_cls, "unbindPip"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "checkPipAvail"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getBoundPipNet"); - fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getConflictingPipNet"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getPipsDownhill"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getPipsUphill"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getWireAliases"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getPipSrcWire"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getPipDstWire"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getPipDelay"); - fn_wrapper_1a, + fn_wrapper_1a, pass_through>::def_wrap(ctx_cls, "getPackagePinBel"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getBelPackagePin"); - fn_wrapper_0a>::def_wrap( + fn_wrapper_0a>::def_wrap( ctx_cls, "getChipName"); - fn_wrapper_0a>::def_wrap(ctx_cls, + fn_wrapper_0a>::def_wrap(ctx_cls, "archId"); typedef std::unordered_map> CellMap; typedef std::unordered_map> NetMap; - readonly_wrapper>::def_wrap(ctx_cls, + readonly_wrapper>::def_wrap(ctx_cls, "cells"); - readonly_wrapper>::def_wrap(ctx_cls, + readonly_wrapper>::def_wrap(ctx_cls, "nets"); WRAP_RANGE(Bel, conv_to_str); WRAP_RANGE(Wire, conv_to_str);