25 #ifndef TRACE_HELPER_H 26 #define TRACE_HELPER_H 48 inline std::string ToHexString(T v) {
49 std::ostringstream ss;
50 ss <<
"0x" << std::hex << v;
60 inline std::string ToString(T v) {
61 std::ostringstream ss;
70 std::ostringstream ss;
77 std::ostringstream ss;
79 ss <<
"stream:<null>";
89 inline std::string ToString(hipMemcpyKind v) {
91 CASE_STR(hipMemcpyHostToHost);
92 CASE_STR(hipMemcpyHostToDevice);
93 CASE_STR(hipMemcpyDeviceToHost);
94 CASE_STR(hipMemcpyDeviceToDevice);
95 CASE_STR(hipMemcpyDefault);
97 return ToHexString(v);
103 inline std::string ToString(hipError_t v) {
104 return ihipErrorString(v);
109 inline std::string ToString() {
return (
""); }
115 template <
typename T,
typename... Args>
116 inline std::string ToString(T first, Args... args) {
117 return ToString(first) +
", " + ToString(args...);
Definition: hip_hcc_internal.h:720
Definition: hip_hcc_internal.h:544