21 #ifndef TRACE_HELPER_H
22 #define TRACE_HELPER_H
36 #define CASE_STR(x) case x: return #x;
41 inline std::string ToHexString(T v)
43 std::ostringstream ss;
44 ss <<
"0x" << std::hex << v;
54 inline std::string ToString(T v)
56 std::ostringstream ss;
73 inline std::string ToString(hipStream_t v)
75 std::ostringstream ss;
77 ss <<
"stream:<null>";
95 default :
return ToHexString(v);
103 return ihipErrorString(v);
108 inline std::string ToString()
117 template <
typename T,
typename... Args>
118 inline std::string ToString(T first, Args... args)
120 return ToString(first) +
", " + ToString(args...) ;
Host-to-Device Copy.
Definition: hip_runtime_api.h:131
Device-to-Host Copy.
Definition: hip_runtime_api.h:132
hipError_t
Definition: hip_runtime_api.h:142
hipMemcpyKind
Definition: hip_runtime_api.h:129
Definition: hip_runtime_api.h:47
Device-to-Device Copy.
Definition: hip_runtime_api.h:133
Runtime will automatically determine copy-kind based on virtual addresses.
Definition: hip_runtime_api.h:134
Host-to-Host Copy.
Definition: hip_runtime_api.h:130