diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-05-11 21:26:48 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-05-11 21:26:48 -0700 |
commit | b6a517c47dd5280f25bf23e25160f95714223ff0 (patch) | |
tree | fa09851903dc42e9bf06ce462f703c3819931e9b /unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h | |
parent | 518149e8685cd022fe6c2eac549b3c70284409a9 (diff) |
Added the ability to load fp16 using the texture path.
Improved the performance of some reductions on fp16
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h b/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h index ae4ce3c90..31b361c83 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h @@ -129,6 +129,10 @@ template <> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE double loadConstant(const double* address) { return __ldg(address); } +template <> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE +Eigen::half loadConstant(const Eigen::half* address) { + return Eigen::half(internal::raw_uint16_to_half(__ldg(&address->x))); +} #endif } |