Skip to content

Commit 3201088

Browse files
WIP
1 parent f38da74 commit 3201088

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/xsimd/arch/xsimd_altivec.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,13 @@ namespace xsimd
778778
return bitwise_cast<int16_t>(swizzle(bitwise_cast<uint16_t>(self), mask, altivec {}));
779779
}
780780

781+
// trunc
782+
template <class A, class T, class = typename std::enable_if<std::is_floating_point<T>::value, void>::type>
783+
XSIMD_INLINE batch<T, A> trunc(batch<T, A> const& self, requires_arch<altivec>) noexcept
784+
{
785+
return vec_trunc(self.data);
786+
}
787+
781788
// zip_hi
782789
template <class A, class T, class = typename std::enable_if<std::is_scalar<T>::value, void>::type>
783790
XSIMD_INLINE batch<T, A> zip_hi(batch<T, A> const& self, batch<T, A> const& other, requires_arch<altivec>) noexcept

0 commit comments

Comments
 (0)