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

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

* std::hash specializations for some HSA types
Tento commit je obsažen v:
Jonathan R. Madsen
2024-05-02 01:50:28 -05:00
odevzdal GitHub
rodič d15cf17635
revize bf75579566
6 změnil soubory, kde provedl 199 přidání a 47 odebrání
+2 -15
Zobrazit soubor
@@ -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;