diff --git a/projects/clr/hipamd/include/hcc_detail/hip_hcc.h b/projects/clr/hipamd/include/hcc_detail/hip_hcc.h index fb10af1106..216e81c67f 100644 --- a/projects/clr/hipamd/include/hcc_detail/hip_hcc.h +++ b/projects/clr/hipamd/include/hcc_detail/hip_hcc.h @@ -715,5 +715,12 @@ inline std::ostream & operator<<(std::ostream& os, const dim3& s) return os; } +// Stream printf functions: +inline std::ostream& operator<<(std::ostream& os, const hipEvent_t& e) +{ + os << "event:" << std::hex << static_cast (e); + return os; +} + #endif diff --git a/projects/clr/hipamd/include/hcc_detail/trace_helper.h b/projects/clr/hipamd/include/hcc_detail/trace_helper.h index 3740d8b9a7..7a8f1106f0 100644 --- a/projects/clr/hipamd/include/hcc_detail/trace_helper.h +++ b/projects/clr/hipamd/include/hcc_detail/trace_helper.h @@ -63,7 +63,9 @@ inline std::string ToString(T v) template <> inline std::string ToString(hipEvent_t v) { - return ToString(&v); + std::ostringstream ss; + ss << v; + return ss.str(); };