aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-03-31 14:44:55 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-03-31 14:44:55 -0700
commit0ea7ab4f623864c82163d106cc93c8a97e4baac6 (patch)
tree7ae9565169988189c8e67810493ee634716e2006 /Eigen
parent92b7f7b6503f2fa66e1f346b88fb6bff434d4d1d (diff)
Hashing was only officially introduced in c++11. Therefore only define an implementation of the hash function for float16 if c++11 is enabled.
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/arch/CUDA/Half.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Eigen/src/Core/arch/CUDA/Half.h b/Eigen/src/Core/arch/CUDA/Half.h
index 70050358c..212aa0d5d 100644
--- a/Eigen/src/Core/arch/CUDA/Half.h
+++ b/Eigen/src/Core/arch/CUDA/Half.h
@@ -415,12 +415,14 @@ using ::sqrt;
using ::floor;
using ::ceil;
+#if __cplusplus > 199711L
template <>
struct hash<Eigen::half> {
size_t operator()(const Eigen::half& a) const {
return std::hash<unsigned short>()(a.x);
}
};
+#endif
} // end namespace std