From 5c13765ee333bb78b5c7baeb515eed97c59b6c1d Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Thu, 14 Apr 2016 10:24:52 -0700 Subject: [PATCH] Added ability to printf fp16 --- Eigen/src/Core/arch/CUDA/Half.h | 5 +++++ 1 file changed, 5 insertions(+) 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(v); + return os; +} + #if __cplusplus > 199711L template <> struct hash {