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;
82 std::ostringstream ss;
84 ss <<
"stream:<null>";
94 inline std::string ToString(hipMemcpyKind v) {
96 CASE_STR(hipMemcpyHostToHost);
97 CASE_STR(hipMemcpyHostToDevice);
98 CASE_STR(hipMemcpyDeviceToHost);
99 CASE_STR(hipMemcpyDeviceToDevice);
100 CASE_STR(hipMemcpyDefault);
102 return ToHexString(v);
108 inline std::string ToString(hipError_t v) {
109 return ihipErrorString(v);
114 inline std::string ToString() {
return (
""); }
120 template <
typename T,
typename... Args>
121 inline std::string ToString(T first, Args... args) {
122 return ToString(first) +
", " + ToString(args...);
Definition: hip_runtime_api.h:113
Definition: hip_hcc_internal.h:759
Definition: hip_hcc_internal.h:580