diff --git a/Eigen/src/Core/GenericPacketMath.h b/Eigen/src/Core/GenericPacketMath.h index 9618b489c..dba1d5a42 100644 --- a/Eigen/src/Core/GenericPacketMath.h +++ b/Eigen/src/Core/GenericPacketMath.h @@ -559,7 +559,8 @@ pblend(const Selector::size>& ifPacket, const Packet& th } /** \internal \returns \a a with last coefficients replaced by the scalar b */ -template EIGEN_DEVICE_FUNC Packet pinsertlast(const Packet& a, typename unpacket_traits::type b) +template EIGEN_DEVICE_FUNC inline Packet +pinsertlast(const Packet& a, typename unpacket_traits::type b) { // Default implementation based on pblend. // It must be specialized for higher performance. diff --git a/Eigen/src/Core/arch/AVX/PacketMath.h b/Eigen/src/Core/arch/AVX/PacketMath.h index 8fb844982..0efdde722 100644 --- a/Eigen/src/Core/arch/AVX/PacketMath.h +++ b/Eigen/src/Core/arch/AVX/PacketMath.h @@ -604,12 +604,12 @@ template<> EIGEN_STRONG_INLINE Packet4d pblend(const Selector<4>& ifPacket, cons return _mm256_blendv_pd(thenPacket, elsePacket, false_mask); } -template<> EIGEN_DEVICE_FUNC Packet8f pinsertlast(const Packet8f& a, float b) +template<> EIGEN_STRONG_INLINE Packet8f pinsertlast(const Packet8f& a, float b) { return _mm256_blend_ps(a,pset1(b),(1<<7)); } -template<> EIGEN_DEVICE_FUNC Packet4d pinsertlast(const Packet4d& a, double b) +template<> EIGEN_STRONG_INLINE Packet4d pinsertlast(const Packet4d& a, double b) { return _mm256_blend_pd(a,pset1(b),(1<<3)); } diff --git a/Eigen/src/Core/arch/SSE/PacketMath.h b/Eigen/src/Core/arch/SSE/PacketMath.h index 13cb51b8d..b519e3748 100755 --- a/Eigen/src/Core/arch/SSE/PacketMath.h +++ b/Eigen/src/Core/arch/SSE/PacketMath.h @@ -818,7 +818,7 @@ template<> EIGEN_STRONG_INLINE Packet2d pblend(const Selector<2>& ifPacket, cons #endif } -template<> EIGEN_DEVICE_FUNC Packet4f pinsertlast(const Packet4f& a, float b) +template<> EIGEN_STRONG_INLINE Packet4f pinsertlast(const Packet4f& a, float b) { #ifdef EIGEN_VECTORIZE_SSE4_1 return _mm_blend_ps(a,pset1(b),(1<<3)); @@ -828,7 +828,7 @@ template<> EIGEN_DEVICE_FUNC Packet4f pinsertlast(const Packet4f& a, float b) #endif } -template<> EIGEN_DEVICE_FUNC Packet2d pinsertlast(const Packet2d& a, double b) +template<> EIGEN_STRONG_INLINE Packet2d pinsertlast(const Packet2d& a, double b) { #ifdef EIGEN_VECTORIZE_SSE4_1 return _mm_blend_pd(a,pset1(b),(1<<1));