Add a default constructor for the "fake" __half class when not using the

__half class provided by CUDA.
This commit is contained in:
Rasmus Munk Larsen 2016-11-29 13:18:09 -08:00
parent 3011dc94ef
commit a0329f64fb

View File

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