aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/arch/GPU
diff options
context:
space:
mode:
authorGravatar Rasmus Munk Larsen <rmlarsen@google.com>2019-06-28 12:07:29 -0700
committerGravatar Rasmus Munk Larsen <rmlarsen@google.com>2019-06-28 12:07:29 -0700
commit8053eeb51e1735f3956f49555ac3901388c2ccca (patch)
tree13ce2fa2d584de1e8bfd3c3fb15080dbae3397c6 /Eigen/src/Core/arch/GPU
parent74a9dd11022b58685de29230f5cf69067bd7fbd4 (diff)
Fix CUDA compilation error for pselect<half>.
Diffstat (limited to 'Eigen/src/Core/arch/GPU')
-rw-r--r--Eigen/src/Core/arch/GPU/PacketMathHalf.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Eigen/src/Core/arch/GPU/PacketMathHalf.h b/Eigen/src/Core/arch/GPU/PacketMathHalf.h
index 4b2c01022..5e143e65a 100644
--- a/Eigen/src/Core/arch/GPU/PacketMathHalf.h
+++ b/Eigen/src/Core/arch/GPU/PacketMathHalf.h
@@ -180,8 +180,10 @@ template <>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pselect<half2>(const half2& mask,
const half2& a,
const half2& b) {
- half result_low = __low2half(mask) == __half(0) ? __low2half(b) : __low2half(a);
- half result_high = __high2half(mask) == __half(0) ? __high2half(b) : __high2half(a);
+ half mask_low = __low2half(mask);
+ half mask_high = __high2half(mask);
+ half result_low = mask_low == half(0) ? __low2half(b) : __low2half(a);
+ half result_high = mask_high == half(0) ? __high2half(b) : __high2half(a);
return __halves2half2(result_low, result_high);
}