Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Applencourt committed Jul 23, 2024
1 parent c1221cc commit 6d6c08d
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions xprof/btx_tally.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,14 @@ auto get_uniq_tally(std::unordered_map<std::tuple<K...>, V> &input) {

for (auto const &m : input)
add_to_set(tuple_set, m.first, s);
return tuple_set;
//return tuple_set;

std::vector<size_t> a;
auto N = (sizeof...(K));
for (unsigned long i=0; i < N; i++) {
a.push_back(10);
}
return a;
}

template <typename TC, typename = std::enable_if_t<std::is_base_of_v<TallyCoreBase, TC>>>
Expand Down Expand Up @@ -309,16 +316,16 @@ std::ostream &operator<<(std::ostream &os, std::pair<std::string, long> &pair) {
}

// Print 2 Tuple correspond to the hostname, process, ... device, subdevice.
template <class... T, class... T2, size_t... I>
void print_tally_header(std::ostream &os, const std::tuple<T...> &s, const std::tuple<T2...> &h,
template <class T, class... T2, size_t... I>
void print_tally_header(std::ostream &os, const std::vector<T> &s, const std::tuple<T2...> &h,
std::index_sequence<I...>) {
((std::get<I>(s).size() ? os << std::get<I>(s).size() << " " << std::get<I>(h) << " | "
(( (I < s.size() ) ? os << s[I] << " " << std::get<I>(h) << " | "
: os << ""),
...);
}

template <class... T, class... T2>
void print_tally_header(std::ostream &os, const std::string &header, const std::tuple<T...> &s,
template <class T, class... T2>
void print_tally_header(std::ostream &os, const std::string &header, const std::vector<T> &s,
const std::tuple<T2...> &h) {
os << header << " | ";
constexpr auto seq = std::make_index_sequence<sizeof...(T2)>();
Expand Down

0 comments on commit 6d6c08d

Please sign in to comment.