Added the ability to hash a fp16

This commit is contained in:
Benoit Steiner 2016-03-31 13:09:23 -07:00
parent 0f5cc504fe
commit f197813f37

View File

@ -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