C++ headers for std::hash, operator==, operator!= (#833)

* C++ headers for std::hash, operator==, operator!=

* std::hash specializations for some HSA types
This commit is contained in:
Jonathan R. Madsen
2024-05-02 01:50:28 -05:00
کامیت شده توسط GitHub
والد d15cf17635
کامیت bf75579566
6فایلهای تغییر یافته به همراه199 افزوده شده و 47 حذف شده
+2 -18
مشاهده پرونده
@@ -24,21 +24,5 @@
#include <rocprofiler-sdk/agent.h>
#include <rocprofiler-sdk/fwd.h>
namespace std
{
template <typename Tp>
struct hash;
template <>
struct hash<rocprofiler_agent_id_t>
{
size_t operator()(rocprofiler_agent_id_t id) const { return id.handle; }
};
} // namespace std
inline bool
operator==(rocprofiler_agent_id_t lhs, rocprofiler_agent_id_t rhs)
{
return (lhs.handle == rhs.handle);
}
#include <rocprofiler-sdk/cxx/hash.hpp>
#include <rocprofiler-sdk/cxx/operators.hpp>