diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-04-14 10:24:52 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-04-14 10:24:52 -0700 |
commit | 5c13765ee333bb78b5c7baeb515eed97c59b6c1d (patch) | |
tree | 25ef2716592bcb8c4a3f38e53c5171862247bb12 | |
parent | c7167fee0eaf188fbe7ce7b877971b928f798a7a (diff) |
Added ability to printf fp16
-rw-r--r-- | Eigen/src/Core/arch/CUDA/Half.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Eigen/src/Core/arch/CUDA/Half.h b/Eigen/src/Core/arch/CUDA/Half.h index 482b654ac..8249ce2eb 100644 --- a/Eigen/src/Core/arch/CUDA/Half.h +++ b/Eigen/src/Core/arch/CUDA/Half.h @@ -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> { |