diff --git a/projects/hip/api/hip/trace_helper.h b/projects/hip/api/hip/trace_helper.h index 3f87fbe1b3..650ee89422 100644 --- a/projects/hip/api/hip/trace_helper.h +++ b/projects/hip/api/hip/trace_helper.h @@ -113,6 +113,27 @@ inline std::string ToHexString(T v) { return ss.str(); }; +template +inline std::string ToString(T* v) { + std::ostringstream ss; + if (v == NULL) { + ss << "char array:"; + } else { + ss << v; + } + return ss.str(); +}; + +template +inline std::string ToString(T** v) { + std::ostringstream ss; + if (v == NULL) { + ss << "char array:"; + } else { + ss << v; + } + return ss.str(); +}; //--- // Template overloads for ToString to handle specific types @@ -125,11 +146,6 @@ inline std::string ToString(T v) { return ss.str(); }; -template <> -inline std::string ToString(const char* v) { - return ToHexString(v); -}; - template <> inline std::string ToString(hipFunction_t v) { std::ostringstream ss;