Added the ability to load fp16 using the texture path.

Improved the performance of some reductions on fp16
This commit is contained in:
Benoit Steiner
2016-05-11 21:26:48 -07:00
parent 518149e868
commit b6a517c47d
2 changed files with 10 additions and 6 deletions

View File

@@ -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
}