Skip to content

Commit 58f434c

Browse files
WIP
1 parent e68ad27 commit 58f434c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/xsimd/arch/xsimd_altivec.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ namespace xsimd
107107
XSIMD_INLINE batch<T, A> avg(batch<T, A> const& self, batch<T, A> const& other, requires_arch<altivec>) noexcept
108108
{
109109
constexpr auto nbit = 8 * sizeof(T) - 1;
110-
constexpr auto adj = ((self ^ other) << nbit) >> nbit;
110+
auto adj = ((self ^ other) << nbit) >> nbit;
111111
return avgr(self.data, other.data, A {}) - adj;
112112
}
113113

@@ -613,7 +613,7 @@ namespace xsimd
613613
template <class A, class T, class = typename std::enable_if<std::is_scalar<T>::value, void>::type>
614614
XSIMD_INLINE batch<T, A> neg(batch<T, A> const& self, requires_arch<altivec>) noexcept
615615
{
616-
return vec_neg(self.data);
616+
return -(self.data);
617617
}
618618

619619
// neq

0 commit comments

Comments
 (0)