CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
triton_utils.h
Go to the documentation of this file.
1 #ifndef HeterogeneousCore_SonicTriton_triton_utils
2 #define HeterogeneousCore_SonicTriton_triton_utils
3 
5 
6 #include <string>
7 #include <string_view>
8 #include <vector>
9 #include <unordered_set>
10 
11 #include "grpc_client.h"
12 
13 namespace triton_utils {
14 
16 
17  template <typename C>
18  std::string printColl(const C& coll, const std::string& delim = ", ");
19 
20  //helper to turn triton error into exception
21  void throwIfError(const Error& err, std::string_view msg);
22 } // namespace triton_utils
23 
24 extern template std::string triton_utils::printColl(const edm::Span<std::vector<int64_t>::const_iterator>& coll,
25  const std::string& delim);
26 extern template std::string triton_utils::printColl(const std::vector<uint8_t>& coll, const std::string& delim);
27 extern template std::string triton_utils::printColl(const std::vector<float>& coll, const std::string& delim);
28 extern template std::string triton_utils::printColl(const std::unordered_set<std::string>& coll,
29  const std::string& delim);
30 
31 #endif
edm::ErrorSummaryEntry Error
void throwIfError(const Error &err, std::string_view msg)
Definition: triton_utils.cc:21
triton::client::Error Error
Definition: triton_utils.h:15
tuple msg
Definition: mps_check.py:285
Definition: Span.h:16
std::string printColl(const C &coll, const std::string &delim=", ")
Definition: triton_utils.cc:12