improve debug for event

Change-Id: If6c0e25729d9964cbe5967833247a6d791d575a0
This commit is contained in:
Ben Sander
2016-09-01 13:58:54 -05:00
parent 02f65a483c
commit 8a4900b679
2 changed files with 10 additions and 1 deletions
+7
View File
@@ -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<void*> (e);
return os;
}
#endif
+3 -1
View File
@@ -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();
};