Skip to content

Commit 46eebca

Browse files
WIP
1 parent 0ba11e3 commit 46eebca

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

include/xsimd/arch/xsimd_altivec.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ namespace xsimd
140140
template <class A, class T, class = typename std::enable_if<std::is_scalar<T>::value, void>::type>
141141
XSIMD_INLINE batch<T, A> bitwise_andnot(batch<T, A> const& self, batch<T, A> const& other, requires_arch<altivec>) noexcept
142142
{
143-
return self.data & ~other.data;
143+
return vec_and(self.data, vec_nor(other.data, other.data));
144144
}
145145
template <class A, class T, class = typename std::enable_if<std::is_scalar<T>::value, void>::type>
146146
XSIMD_INLINE batch_bool<T, A> bitwise_andnot(batch_bool<T, A> const& self, batch_bool<T, A> const& other, requires_arch<altivec>) noexcept

test/test_xsimd_api.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ bool extract(xsimd::batch_bool<T, A> const& batch) { return batch.get(0); }
4141
#define INTEGRAL_TYPES_HEAD char, unsigned char, signed char, short, unsigned short, int, unsigned int, long, unsigned long
4242
#ifdef XSIMD_NO_SUPPORTED_ARCHITECTURE
4343
#define INTEGRAL_TYPES_TAIL
44+
#elif XSIMD_WITH_ALTIVEC
45+
#define INTEGRAL_TYPES_TAIL , xsimd::batch<char>, xsimd::batch<unsigned char>, xsimd::batch<signed char>, xsimd::batch<short>, xsimd::batch<unsigned short>, xsimd::batch<int>, xsimd::batch<unsigned int>
4446
#else
4547
#define INTEGRAL_TYPES_TAIL , xsimd::batch<char>, xsimd::batch<unsigned char>, xsimd::batch<signed char>, xsimd::batch<short>, xsimd::batch<unsigned short>, xsimd::batch<int>, xsimd::batch<unsigned int>, xsimd::batch<long>, xsimd::batch<unsigned long>
4648
#endif
@@ -56,7 +58,7 @@ bool extract(xsimd::batch_bool<T, A> const& batch) { return batch.get(0); }
5658
#define FLOAT_TYPES_TAIL
5759
#else
5860
#define FLOAT_TYPES_MIDDLE , xsimd::batch<float>
59-
#if !XSIMD_WITH_NEON || XSIMD_WITH_NEON64
61+
#if (!XSIMD_WITH_NEON && !XSIMD_WITH_ALTIVEC) || XSIMD_WITH_NEON64
6062
#define FLOAT_TYPES_TAIL , xsimd::batch<double>
6163
#else
6264
#define FLOAT_TYPES_TAIL
@@ -76,7 +78,7 @@ bool extract(xsimd::batch_bool<T, A> const& batch) { return batch.get(0); }
7678
#else
7779
#define ALL_FLOATING_POINT_TYPES_MIDDLE , xsimd::batch<float>, xsimd::batch<std::complex<float>>
7880

79-
#if !XSIMD_WITH_NEON || XSIMD_WITH_NEON64
81+
#if (!XSIMD_WITH_NEON && !XSIMD_WITH_ALTIVEC) || XSIMD_WITH_NEON64
8082
#define ALL_FLOATING_POINT_TYPES_TAIL , xsimd::batch<double>, xsimd::batch<std::complex<double>>
8183
#else
8284
#define ALL_FLOATING_POINT_TYPES_TAIL

0 commit comments

Comments
 (0)