aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src')
-rw-r--r--Eigen/src/Core/arch/CUDA/PacketMathHalf.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h
index c99c1acf7..d0106f4f1 100644
--- a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h
+++ b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h
@@ -33,8 +33,9 @@ __device__ half operator - (const half& a, const half& b) {
return __hsub(a, b);
}
__device__ half operator / (const half& a, const half& b) {
- assert(false && "tbd");
- return half();
+ float num = __half2float(a);
+ float denom = __half2float(b);
+ return __float2half(num / denom);
}
__device__ half operator - (const half& a) {
return __hneg(a);
@@ -52,7 +53,7 @@ __device__ half operator -= (half& a, const half& b) {
return a;
}
__device__ half operator /= (half& a, const half& b) {
- assert(false && "tbd");
+ a = a / b;
return a;
}