Added ability to printf fp16

This commit is contained in:
Benoit Steiner 2016-04-14 10:24:52 -07:00
parent c7167fee0e
commit 5c13765ee3

View File

@ -510,6 +510,11 @@ static EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC int (isfinite)(const Eigen::half& a
namespace std {
ostream& operator << (ostream& os, const Eigen::half& v) {
os << static_cast<float>(v);
return os;
}
#if __cplusplus > 199711L
template <>
struct hash<Eigen::half> {