76 for (
const auto& fr : invec) {
81 if (neos == invec.size()) {
85 std::cerr <<
"Gen::FrameFanin: " << neos <<
" input frames missing\n";
89 std::cerr <<
"Gen::FrameFanin: got unexpected multiplicity, got:" 91 THROW(ValueError() <<
errmsg{
"unexpected multiplicity"});
98 std::vector< std::tuple<tagrules::tag_t, IFrame::trace_list_t, IFrame::trace_summary_t> > stash;
104 const size_t trace_offset = out_traces.size();
106 const auto& fr = invec[iport];
107 if (!one) { one = fr; }
108 auto traces = fr->traces();
112 auto fintags = fr->frame_tags();
113 fintags.push_back(
"");
115 fouttags.insert(fo.begin(), fo.end());
120 for (
auto inttag : fr->trace_tags()) {
122 if (touttags.empty()) {
131 const auto&
summary = fr->trace_summary(inttag);
133 for (
size_t trind : fr->tagged_traces(inttag)) {
134 outtrinds.push_back(trind + trace_offset);
136 for (
auto ot : touttags) {
138 stash.push_back(std::make_tuple(ot, outtrinds,
summary));
145 std::iota(tl.begin(), tl.end(), trace_offset);
150 out_traces.insert(out_traces.end(), traces->begin(), traces->end());
153 auto sf =
new SimpleFrame(one->ident(), one->time(), out_traces, one->tick());
158 sf->tag_traces(
m_tags[iport], by_port[iport]);
161 for (
auto ftag : fouttags) {
165 for (
auto ttt : stash) {
168 sf->tag_traces(get<0>(ttt), get<1>(ttt), get<2>(ttt));
std::shared_ptr< const IFrame > pointer
std::unordered_set< tag_t > tagset_t
boost::error_info< struct tag_errmsg, std::string > errmsg
std::vector< pointer > vector
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
std::vector< std::string > m_tags
tagset_t transform(size_t ind, const std::string &name, const tag_t &tag)
std::vector< size_t > trace_list_t
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
QTextStream & endl(QTextStream &s)