mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-10 23:09:06 +08:00
Added the ability to hash a fp16
This commit is contained in:
parent
0f5cc504fe
commit
f197813f37
@ -414,6 +414,13 @@ using ::log;
|
|||||||
using ::sqrt;
|
using ::sqrt;
|
||||||
using ::floor;
|
using ::floor;
|
||||||
using ::ceil;
|
using ::ceil;
|
||||||
|
template <>
|
||||||
|
|
||||||
|
struct hash<Eigen::half> {
|
||||||
|
size_t operator()(const Eigen::half& a) const {
|
||||||
|
return std::hash<unsigned short>()(a.x);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
} // end namespace std
|
} // end namespace std
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user