We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a7ad74 commit ca1c081Copy full SHA for ca1c081
sycl/include/sycl/ext/oneapi/bfloat16.hpp
@@ -154,7 +154,6 @@ class bfloat16 {
154
155
// Friend traits.
156
friend std::numeric_limits<bfloat16>;
157
- friend std::hash<bfloat16>;
158
159
// Friend classes for vector operations
160
friend class sycl::vec<bfloat16, 1>;
@@ -633,7 +632,7 @@ namespace std {
633
632
// Specialization of `std::hash<sycl::ext::oneapi::bfloat16>`.
634
template <> struct hash<sycl::ext::oneapi::bfloat16> {
635
size_t operator()(sycl::ext::oneapi::bfloat16 const &Key) const noexcept {
636
- return hash<uint16_t>{}(Key.value);
+ return hash<uint16_t>{}(sycl::bit_cast<uint16_t>(Key));
637
}
638
};
639
0 commit comments