LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
triton_utils.h
Go to the documentation of this file.
1 #ifndef NuSonic_Triton_triton_utils
2 #define NuSonic_Triton_triton_utils
3 
4 #include <string>
5 #include <string_view>
6 
7 #include "grpc_client.h"
8 
9 namespace triton_utils {
10 
11  //using Error = nvidia::inferenceserver::client::Error;
13 
14  template <typename C>
15  std::string printColl(const C& coll, const std::string& delim = ", ");
16 
17  //helper to turn triton error into exception
18  void throwIfError(const Error& err, std::string_view msg);
19 
20  //helper to turn triton error into warning
21  bool warnIfError(const Error& err, std::string_view msg);
22 
23 } // namespace triton_utils
24 
25 #endif
std::string printColl(const C &coll, const std::string &delim)
Definition: triton_utils.cc:15
bool warnIfError(const Error &err, std::string_view msg)
Definition: triton_utils.cc:31
void throwIfError(const Error &err, std::string_view msg)
Definition: triton_utils.cc:26
triton::client::Error Error
Definition: triton_utils.h:12