aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-02-18 23:15:23 -0800
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-02-18 23:15:23 -0800
commit0606a0a39bcf01b0a03f0dcd17f7075fce8c402c (patch)
tree52ee01bb4b91e29211c3a711258f665c901eb099 /Eigen/src
parentf36c0c2c65a78959f6ccbbc29c6e80f86b062bc8 (diff)
FP16 on CUDA are only available starting with cuda 7.5. Disable them when using an older version of CUDA
Diffstat (limited to 'Eigen/src')
-rw-r--r--Eigen/src/Core/arch/CUDA/TypeCasting.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Eigen/src/Core/arch/CUDA/TypeCasting.h b/Eigen/src/Core/arch/CUDA/TypeCasting.h
index a8c06ff48..279fd4fd0 100644
--- a/Eigen/src/Core/arch/CUDA/TypeCasting.h
+++ b/Eigen/src/Core/arch/CUDA/TypeCasting.h
@@ -14,6 +14,8 @@ namespace Eigen {
namespace internal {
+#if defined(EIGEN_HAS_CUDA_FP16)
+
template<>
struct scalar_cast_op<float, half> {
EIGEN_EMPTY_STRUCT_CTOR(scalar_cast_op)
@@ -92,6 +94,7 @@ template<> EIGEN_STRONG_INLINE half2 pcast<float4, half2>(const float4& a) {
#endif
}
+#endif
} // end namespace internal