Skip to content

Commit 2e4cd22

Browse files
WIP
1 parent afbe6c1 commit 2e4cd22

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

include/xsimd/arch/xsimd_altivec.hpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,11 @@ namespace xsimd
247247
{
248248
return vec_mul(self.data, vec_re(other.data));
249249
}
250+
template <class A>
251+
XSIMD_INLINE batch<double, A> div(batch<double, A> const& self, batch<double, A> const& other, requires_arch<altivec>) noexcept
252+
{
253+
return vec_mul(self.data, vec_re(other.data));
254+
}
250255

251256
// fast_cast
252257
namespace detail
@@ -445,6 +450,11 @@ namespace xsimd
445450
{
446451
return ~vec_cmpeq(self.data, self.data);
447452
}
453+
template <class A>
454+
XSIMD_INLINE batch_bool<double, A> isnan(batch<double, A> const& self, requires_arch<altivec>) noexcept
455+
{
456+
return ~vec_cmpeq(self.data, self.data);
457+
}
448458

449459
// load_aligned
450460
template <class A, class T, class = typename std::enable_if<std::is_scalar<T>::value, void>::type>
@@ -470,6 +480,11 @@ namespace xsimd
470480
{
471481
return { vec_mergee(hi.data, lo.data), vec_mergeo(hi.data, lo.data) };
472482
}
483+
template <class A>
484+
XSIMD_INLINE batch<std::complex<double>, A> load_complex(batch<double, A> const& hi, batch<double, A> const& lo, requires_arch<altivec>) noexcept
485+
{
486+
return { vec_mergee(hi.data, lo.data), vec_mergeo(hi.data, lo.data) };
487+
}
473488
}
474489

475490
// le
@@ -620,6 +635,12 @@ namespace xsimd
620635
{
621636
return vec_re(self.data);
622637
}
638+
template <class A>
639+
XSIMD_INLINE batch<double, A> reciprocal(batch<double, A> const& self,
640+
kernel::requires_arch<altivec>)
641+
{
642+
return vec_re(self.data);
643+
}
623644

624645
// reduce_add
625646
template <class A, class T, class = typename std::enable_if<std::is_scalar<T>::value, void>::type>

0 commit comments

Comments
 (0)