From 6bc684ab6a9c300d9d19a6371f253a4321c37e4c Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Mon, 23 May 2016 20:32:30 -0700 Subject: [PATCH] Added missing alignment in the fp16 packet traits --- 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 bb3b6692f..840c40466 100644 --- a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h +++ b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h @@ -355,7 +355,7 @@ struct packet_traits : default_packet_traits { }; -template<> struct unpacket_traits { typedef Eigen::half type; enum {size=8}; typedef Packet8h half; }; +template<> struct unpacket_traits { typedef Eigen::half type; enum {size=8, alignment=Aligned16}; typedef Packet8h half; }; template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet8h pset1(const half& from) { Packet8h result; @@ -586,7 +586,7 @@ struct packet_traits : default_packet_traits { }; -template<> struct unpacket_traits { typedef Eigen::half type; enum {size=4}; typedef Packet4h half; }; +template<> struct unpacket_traits { typedef Eigen::half type; enum {size=4, alignment=Aligned16}; typedef Packet4h half; }; template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h pset1(const half& from) { Packet4h result;