mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Optimize predux<Packet8f> (AVX)
This commit is contained in:
@@ -395,9 +395,7 @@ template<> EIGEN_STRONG_INLINE Packet4d preduxp<Packet4d>(const Packet4d* vecs)
|
|||||||
|
|
||||||
template<> EIGEN_STRONG_INLINE float predux<Packet8f>(const Packet8f& a)
|
template<> EIGEN_STRONG_INLINE float predux<Packet8f>(const Packet8f& a)
|
||||||
{
|
{
|
||||||
Packet8f tmp0 = _mm256_hadd_ps(a,_mm256_permute2f128_ps(a,a,1));
|
return predux(_mm_add_ps(_mm256_castps256_ps128(a),_mm256_extractf128_ps(a,1)));
|
||||||
tmp0 = _mm256_hadd_ps(tmp0,tmp0);
|
|
||||||
return pfirst(_mm256_hadd_ps(tmp0, tmp0));
|
|
||||||
}
|
}
|
||||||
template<> EIGEN_STRONG_INLINE double predux<Packet4d>(const Packet4d& a)
|
template<> EIGEN_STRONG_INLINE double predux<Packet4d>(const Packet4d& a)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user