Skip to content

Commit 37548ca

Browse files
WIP
1 parent 62b9257 commit 37548ca

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/xsimd/arch/xsimd_altivec.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ namespace xsimd
134134
template <class A, class T, class = typename std::enable_if<std::is_integral<T>::value, void>::type>
135135
XSIMD_INLINE batch<T, A> bitwise_andnot(batch<T, A> const& self, batch<T, A> const& other, requires_arch<altivec>) noexcept
136136
{
137-
return vec_nand(self.data, other.data);
137+
return self.data & ~other.data;
138138
}
139-
template <class A, class T, class = typename std::enable_if<std::is_integral<T>::value, void>::type>
139+
template <class A, class T, class = typename std::enable_if<std::is_scalar<T>::value, void>::type>
140140
XSIMD_INLINE batch_bool<T, A> bitwise_andnot(batch_bool<T, A> const& self, batch_bool<T, A> const& other, requires_arch<altivec>) noexcept
141141
{
142-
return vec_nand(self.data, other.data);
142+
return self.data & ~other.data;
143143
}
144144

145145
// bitwise_lshift
@@ -191,7 +191,7 @@ namespace xsimd
191191
return vec_xor(self.data, other.data);
192192
}
193193
template <class A, class T, class = typename std::enable_if<std::is_scalar<T>::value, void>::type>
194-
XSIMD_INLINE batch<T, A> bitwise_xor(batch_bool<T, A> const& self, batch_bool<T, A> const& other, requires_arch<altivec>) noexcept
194+
XSIMD_INLINE batch_bool<T, A> bitwise_xor(batch_bool<T, A> const& self, batch_bool<T, A> const& other, requires_arch<altivec>) noexcept
195195
{
196196
return vec_xor(self.data, other.data);
197197
}

0 commit comments

Comments
 (0)