From 33a94f5dc761e9d9f7a367b9e08b1f2756efdef8 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Mon, 23 May 2016 20:37:30 -0700 Subject: [PATCH] Use the Index type instead of integers to specify the strides in pgather/pscatter --- Eigen/src/Core/arch/CUDA/PacketMathHalf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h index 840c40466..d629a470b 100644 --- a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h +++ b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h @@ -88,11 +88,11 @@ EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE half2 ploadt_ro(const ha #endif } -template<> EIGEN_DEVICE_FUNC inline half2 pgather(const half* from, int stride) { +template<> EIGEN_DEVICE_FUNC inline half2 pgather(const half* from, Index stride) { return __halves2half2(from[0*stride], from[1*stride]); } -template<> EIGEN_DEVICE_FUNC inline void pscatter(half* to, const half2& from, int stride) { +template<> EIGEN_DEVICE_FUNC inline void pscatter(half* to, const half2& from, Index stride) { to[stride*0] = __low2half(from); to[stride*1] = __high2half(from); }