diff --git a/xprof/btx_tally.hpp b/xprof/btx_tally.hpp index 2c2b0b8b..95902238 100644 --- a/xprof/btx_tally.hpp +++ b/xprof/btx_tally.hpp @@ -143,7 +143,7 @@ auto aggregate_by_name(std::unordered_map, TC> &m) { ("iris01",0,1,"getDeviceInfo") : CoreTime, ("iris01",1,0,"getDeviceInfo") : CoreTime } - output vector{1, 2, 3, 3 } + output vector{1, 2, 3} */ // Base case to stop recursion @@ -159,10 +159,11 @@ template void _get_uniq_tally(std::set> &s, std::v } // Exposed Class template auto get_uniq_tally(std::unordered_map, K> &m) { - // Map to Set - std::set> s; + // Map to Set. Can remove the last elements who is the `api name` + typedef decltype(make_tuple_without_last(std::declval>())) Minusone; + std::set s; for (auto &[k, v] : m) - s.insert(k); + s.insert(make_tuple_without_last(k)); // Get the Tally std::vector v{}; _get_uniq_tally(s, v);