mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-14 17:11:50 +08:00
Guard AVX2 implementation of psignbit in PacketMath.h
This commit is contained in:
parent
be54cc8ded
commit
283d69294b
@ -1837,7 +1837,11 @@ EIGEN_STRONG_INLINE Packet8bf psignbit(const Packet8bf& a) {
|
|||||||
}
|
}
|
||||||
template <>
|
template <>
|
||||||
EIGEN_STRONG_INLINE Packet8f psignbit(const Packet8f& a) {
|
EIGEN_STRONG_INLINE Packet8f psignbit(const Packet8f& a) {
|
||||||
|
#ifdef EIGEN_VECTORIZE_AVX2
|
||||||
return _mm256_castsi256_ps(_mm256_cmpgt_epi32(_mm256_setzero_si256(), _mm256_castps_si256(a)));
|
return _mm256_castsi256_ps(_mm256_cmpgt_epi32(_mm256_setzero_si256(), _mm256_castps_si256(a)));
|
||||||
|
#else
|
||||||
|
return _mm256_castsi256_ps(parithmetic_shift_right<31>(Packet8i(_mm256_castps_si256(a))));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
template <>
|
template <>
|
||||||
EIGEN_STRONG_INLINE Packet8ui psignbit(const Packet8ui& a) {
|
EIGEN_STRONG_INLINE Packet8ui psignbit(const Packet8ui& a) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user