Skip to content

Commit 07f3bbe

Browse files
Add support for xsimd::widen on PowerPC/VSX
Related to #1179
1 parent f63bd07 commit 07f3bbe

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/xsimd/arch/xsimd_vsx.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,13 @@ namespace xsimd
873873
return vec_trunc(self.data);
874874
}
875875

876+
// widen
877+
template <class A, class T>
878+
XSIMD_INLINE std::array<batch<double, A>, 2> widen(batch<float, A> const& x, requires_arch<vsx>) noexcept
879+
{
880+
return { batch<double, A>(vec_doublel(x)), batch<double, A>(vec_doubleh(x)) };
881+
}
882+
876883
// zip_hi
877884
template <class A, class T, class = typename std::enable_if<std::is_scalar<T>::value>::type>
878885
XSIMD_INLINE batch<T, A> zip_hi(batch<T, A> const& self, batch<T, A> const& other, requires_arch<vsx>) noexcept

0 commit comments

Comments
 (0)