9 #include <unordered_map> 17 CheapTag(std::string
const&
label,
18 std::string
const& instance,
19 std::string
const& process)
20 : label_{label}, instance_{instance}, process_{process}
41 std::string instance_;
45 [[gnu::unused]]
inline bool 48 return left.label() == right.label() &&
49 left.instance() == right.instance() &&
50 left.process() == right.process();
53 [[gnu::unused]]
inline bool 54 operator!=(CheapTag
const& left, CheapTag
const& right)
56 return !(left ==
right);
59 class PendingBTLEntry {
61 PendingBTLEntry(std::string
const& fcn,
62 std::string
const& moduleLabel,
63 std::string
const& instanceName,
64 std::string
const& procName,
66 : fcn_{fcn}, ct_{moduleLabel, instanceName, procName}, pid_{
pid}
102 std::vector<PendingBTLEntry> pendingEntries;
103 std::unordered_map<ProductID, CheapTag, ProductID::Hash> insertedABVs;
104 for (
auto const& pd : descriptions) {
105 auto const& prodFCN = pd.friendlyClassName();
106 auto const& procName = pd.processName();
107 auto const pid = pd.productID();
108 result[prodFCN][procName].emplace_back(
pid);
111 auto const& moduleLabel = pd.moduleLabel();
112 auto const& instanceName = pd.productInstanceName();
113 auto const& className = pd.producedClassName();
119 if (!baseName.empty()) {
129 insertedABVs.emplace(
pid, CheapTag{moduleLabel, instanceName, procName});
133 auto const iend = insertedABVs.cend();
138 pendingEntries.cbegin(),
139 pendingEntries.cend(),
140 [&result, &insertedABVs, iend](
auto const& pe) {
141 auto& pids = result[pe.fcn()][pe.process()];
143 !std::any_of(pids.cbegin(),
146 auto i = insertedABVs.find(
pid);
147 return i != iend && pe.ct() == i->second;
149 pids.emplace_back(pe.pid());
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
std::vector< BranchDescription > ProductDescriptions
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
std::string name_of_assns_base(std::string assns_type_name)
ProductLookup_t createProductLookups(ProductDescriptions const &descriptions)
bool is_assns(TypeID const &tid)
std::string friendlyName(std::string const &iFullName)
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
bool operator==(Provenance const &a, Provenance const &b)
std::map< std::string, ProcessLookup > ProductLookup_t