mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 20:56:00 +08:00
Uses _mm512_abs_pd for Packet8d pabs
This commit is contained in:
parent
0cc9b5eb40
commit
f019b97aca
@ -139,6 +139,7 @@ template<> struct packet_traits<double> : default_packet_traits
|
|||||||
size = 8,
|
size = 8,
|
||||||
HasHalfPacket = 1,
|
HasHalfPacket = 1,
|
||||||
#if EIGEN_GNUC_AT_LEAST(5, 3) || (!EIGEN_COMP_GNUC_STRICT)
|
#if EIGEN_GNUC_AT_LEAST(5, 3) || (!EIGEN_COMP_GNUC_STRICT)
|
||||||
|
HasAbs = 1,
|
||||||
HasLog = 1,
|
HasLog = 1,
|
||||||
HasSqrt = EIGEN_FAST_MATH,
|
HasSqrt = EIGEN_FAST_MATH,
|
||||||
HasRsqrt = EIGEN_FAST_MATH,
|
HasRsqrt = EIGEN_FAST_MATH,
|
||||||
@ -888,9 +889,7 @@ template<> EIGEN_STRONG_INLINE Packet16f pabs(const Packet16f& a)
|
|||||||
}
|
}
|
||||||
template <>
|
template <>
|
||||||
EIGEN_STRONG_INLINE Packet8d pabs(const Packet8d& a) {
|
EIGEN_STRONG_INLINE Packet8d pabs(const Packet8d& a) {
|
||||||
// _mm512_abs_ps intrinsic not found, so hack around it
|
return _mm512_abs_pd(a);
|
||||||
return _mm512_castsi512_pd(_mm512_and_si512(_mm512_castpd_si512(a),
|
|
||||||
_mm512_set1_epi64(0x7fffffffffffffff)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user