removed negz constants for consistency

This commit is contained in:
Ahmet Inan 2024-02-13 11:59:44 +01:00
commit 56903fc707
6 changed files with 16 additions and 24 deletions

View file

@ -602,10 +602,9 @@ template <>
inline SIMD<float, 4> vcopysign(SIMD<float, 4> a, SIMD<float, 4> b)
{
SIMD<float, 4> tmp;
__m128 negz = _mm_set1_ps(-0.f);
tmp.m = _mm_or_ps(
_mm_andnot_ps(negz, a.m),
_mm_and_ps(negz, b.m));
_mm_andnot_ps(_mm_set1_ps(-0.f), a.m),
_mm_and_ps(_mm_set1_ps(-0.f), b.m));
return tmp;
}
@ -613,10 +612,9 @@ template <>
inline SIMD<double, 2> vcopysign(SIMD<double, 2> a, SIMD<double, 2> b)
{
SIMD<double, 2> tmp;
__m128d negz = _mm_set1_pd(-0.);
tmp.m = _mm_or_pd(
_mm_andnot_pd(negz, a.m),
_mm_and_pd(negz, b.m));
_mm_andnot_pd(_mm_set1_pd(-0.), a.m),
_mm_and_pd(_mm_set1_pd(-0.), b.m));
return tmp;
}