|
@ -227,6 +227,17 @@ struct hash<pod_key_t<N>> { |
|
|
size_t operator()(const pod_key_t<N>& k) const { return XXH3_64bits(&k, sizeof(pod_key_t<N>)); } |
|
|
size_t operator()(const pod_key_t<N>& k) const { return XXH3_64bits(&k, sizeof(pod_key_t<N>)); } |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
template <> |
|
|
|
|
|
struct hash<compact_bg_mesh_coord_t> { |
|
|
|
|
|
using argument_type = compact_bg_mesh_coord_t; |
|
|
|
|
|
using result_type = size_t; |
|
|
|
|
|
|
|
|
|
|
|
result_type operator()(const argument_type& coord) const noexcept { |
|
|
|
|
|
// 使用 uint64_t 的哈希算法,将 hashed_value 映射为 size_t
|
|
|
|
|
|
return static_cast<result_type>(std::hash<uint64_t>()(coord.hashed_value)); |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
template <> |
|
|
template <> |
|
|
struct equal_to<vertex_header_t> { |
|
|
struct equal_to<vertex_header_t> { |
|
|
bool operator()(const vertex_header_t& v1, const vertex_header_t& v2) const |
|
|
bool operator()(const vertex_header_t& v1, const vertex_header_t& v2) const |
|
|