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

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

* std::hash specializations for some HSA types

[ROCm/rocprofiler-sdk commit: bf75579566]
Cette révision appartient à :
Jonathan R. Madsen
2024-05-02 01:50:28 -05:00
révisé par GitHub
Parent 0dc01661c1
révision 5ef0655896
6 fichiers modifiés avec 199 ajouts et 47 suppressions
+2 -15
Voir le fichier
@@ -41,6 +41,8 @@
#include <rocprofiler-sdk/internal_threading.h>
#include <rocprofiler-sdk/marker/api_id.h>
#include <rocprofiler-sdk/rocprofiler.h>
#include <rocprofiler-sdk/cxx/hash.hpp>
#include <rocprofiler-sdk/cxx/operators.hpp>
#include <glog/logging.h>
@@ -67,21 +69,6 @@ __gcov_dump(void);
namespace common = ::rocprofiler::common;
namespace tool = ::rocprofiler::tool;
namespace std
{
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);
}
namespace
{
constexpr uint32_t lds_block_size = 128 * 4;