From 507b661106e2a880b76324ffb97b4a5665a9d4a7 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Thu, 6 Oct 2016 17:57:04 -0700 Subject: [PATCH] Renamed predux_half into predux_downto4 --- Eigen/src/Core/GenericPacketMath.h | 2 +- Eigen/src/Core/arch/AVX/PacketMath.h | 2 +- Eigen/src/Core/arch/AVX512/PacketMath.h | 4 ++-- Eigen/src/Core/products/GeneralBlockPanelKernel.h | 6 +++--- test/packetmath.cpp | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Eigen/src/Core/GenericPacketMath.h b/Eigen/src/Core/GenericPacketMath.h index 07fe0f005..afd806928 100644 --- a/Eigen/src/Core/GenericPacketMath.h +++ b/Eigen/src/Core/GenericPacketMath.h @@ -329,7 +329,7 @@ template EIGEN_DEVICE_FUNC inline typename unpacket_traits EIGEN_DEVICE_FUNC inline typename conditional<(unpacket_traits::size%8)==0,typename unpacket_traits::half,Packet>::type -predux_half(const Packet& a) +predux_downto4(const Packet& a) { return a; } /** \internal \returns the product of the elements of \a a*/ diff --git a/Eigen/src/Core/arch/AVX/PacketMath.h b/Eigen/src/Core/arch/AVX/PacketMath.h index beb3e577d..05b15b852 100644 --- a/Eigen/src/Core/arch/AVX/PacketMath.h +++ b/Eigen/src/Core/arch/AVX/PacketMath.h @@ -405,7 +405,7 @@ template<> EIGEN_STRONG_INLINE double predux(const Packet4d& a) return pfirst(_mm256_hadd_pd(tmp0,tmp0)); } -template<> EIGEN_STRONG_INLINE Packet4f predux_half(const Packet8f& a) +template<> EIGEN_STRONG_INLINE Packet4f predux_downto4(const Packet8f& a) { return _mm_add_ps(_mm256_castps256_ps128(a),_mm256_extractf128_ps(a,1)); } diff --git a/Eigen/src/Core/arch/AVX512/PacketMath.h b/Eigen/src/Core/arch/AVX512/PacketMath.h index 1af4785e1..f6500a16e 100644 --- a/Eigen/src/Core/arch/AVX512/PacketMath.h +++ b/Eigen/src/Core/arch/AVX512/PacketMath.h @@ -905,7 +905,7 @@ EIGEN_STRONG_INLINE double predux(const Packet8d& a) { } template <> -EIGEN_STRONG_INLINE Packet8f predux_half(const Packet16f& a) { +EIGEN_STRONG_INLINE Packet8f predux_downto4(const Packet16f& a) { #ifdef EIGEN_VECTORIZE_AVX512DQ Packet8f lane0 = _mm512_extractf32x8_ps(a, 0); Packet8f lane1 = _mm512_extractf32x8_ps(a, 1); @@ -921,7 +921,7 @@ EIGEN_STRONG_INLINE Packet8f predux_half(const Packet16f& a) { #endif } template <> -EIGEN_STRONG_INLINE Packet4d predux_half(const Packet8d& a) { +EIGEN_STRONG_INLINE Packet4d predux_downto4(const Packet8d& a) { Packet4d lane0 = _mm512_extractf64x4_pd(a, 0); Packet4d lane1 = _mm512_extractf64x4_pd(a, 1); Packet4d res = padd(lane0, lane1); diff --git a/Eigen/src/Core/products/GeneralBlockPanelKernel.h b/Eigen/src/Core/products/GeneralBlockPanelKernel.h index 10d132957..3db857390 100644 --- a/Eigen/src/Core/products/GeneralBlockPanelKernel.h +++ b/Eigen/src/Core/products/GeneralBlockPanelKernel.h @@ -580,7 +580,7 @@ DoublePacket padd(const DoublePacket &a, const DoublePacket -const DoublePacket& predux_half(const DoublePacket &a) +const DoublePacket& predux_downto4(const DoublePacket &a) { return a; } @@ -1596,13 +1596,13 @@ void gebp_kernel void packetmath() ref[i] = 0; for (int i=0; i(data1))); - VERIFY(areApprox(ref, data2, PacketSize>4?PacketSize/2:PacketSize) && "internal::predux_half"); + internal::pstore(data2, internal::predux_downto4(internal::pload(data1))); + VERIFY(areApprox(ref, data2, PacketSize>4?PacketSize/2:PacketSize) && "internal::predux_downto4"); } ref[0] = 1;