25 #ifndef TRACE_HELPER_H 26 #define TRACE_HELPER_H 47 inline std::string ToHexString(T v) {
48 std::ostringstream ss;
49 ss <<
"0x" << std::hex << v;
59 inline std::string ToString(T v) {
60 std::ostringstream ss;
69 std::ostringstream ss;
76 std::ostringstream ss;
78 ss <<
"stream:<null>";
88 inline std::string ToString(hipMemcpyKind v) {
90 CASE_STR(hipMemcpyHostToHost);
91 CASE_STR(hipMemcpyHostToDevice);
92 CASE_STR(hipMemcpyDeviceToHost);
93 CASE_STR(hipMemcpyDeviceToDevice);
94 CASE_STR(hipMemcpyDefault);
96 return ToHexString(v);
102 inline std::string ToString(hipError_t v) {
103 return ihipErrorString(v);
108 inline std::string ToString() {
return (
""); }
114 template <
typename T,
typename... Args>
115 inline std::string ToString(T first, Args... args) {
116 return ToString(first) +
", " + ToString(args...);
Definition: hip_hcc_internal.h:700
Definition: hip_hcc_internal.h:518