Merged in rmlarsen/eigen (pull request PR-256)

Add a default constructor for the "fake" __half class when not using the __half class provided by CUDA.
This commit is contained in:
Gael Guennebaud
2016-12-01 15:27:33 +00:00

View File

@@ -53,7 +53,7 @@ namespace half_impl {
// Make our own __half definition that is similar to CUDA's.
struct __half {
EIGEN_DEVICE_FUNC __half() {}
EIGEN_DEVICE_FUNC __half() : x(0) {}
explicit EIGEN_DEVICE_FUNC __half(unsigned short raw) : x(raw) {}
unsigned short x;
};