Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-25 02:40:54

0001 #include "HeterogeneousCore/SonicTriton/interface/triton_utils.h"
0002 
0003 #include <sstream>
0004 #include <experimental/iterator>
0005 
0006 namespace triton_utils {
0007 
0008   template <typename C>
0009   std::string printColl(const C& coll, const std::string& delim) {
0010     if (coll.empty())
0011       return "";
0012     std::stringstream msg;
0013     //avoid trailing delim
0014     std::copy(std::begin(coll), std::end(coll), std::experimental::make_ostream_joiner(msg, delim));
0015     return msg.str();
0016   }
0017 
0018 }  // namespace triton_utils
0019 
0020 template std::string triton_utils::printColl(const edm::Span<std::vector<int64_t>::const_iterator>& coll,
0021                                              const std::string& delim);
0022 template std::string triton_utils::printColl(const std::vector<uint8_t>& coll, const std::string& delim);
0023 template std::string triton_utils::printColl(const std::vector<float>& coll, const std::string& delim);
0024 template std::string triton_utils::printColl(const std::unordered_set<std::string>& coll, const std::string& delim);