@@ -314,6 +314,19 @@ namespace xsimd
314314 return vec_madd (x.data , y.data , z.data );
315315 }
316316
317+ // fms
318+ template <class A >
319+ XSIMD_INLINE batch<float , A> fms (batch<float , A> const & x, batch<float , A> const & y, batch<float , A> const & z, requires_arch<altivec>) noexcept
320+ {
321+ return vec_msub (x.data , y.data , z.data );
322+ }
323+
324+ template <class A >
325+ XSIMD_INLINE batch<double , A> fms (batch<double , A> const & x, batch<double , A> const & y, batch<double , A> const & z, requires_arch<altivec>) noexcept
326+ {
327+ return vec_msub (x.data , y.data , z.data );
328+ }
329+
317330 // eq
318331 template <class A , class T , class = typename std::enable_if<std::is_scalar<T>::value, void >::type>
319332 XSIMD_INLINE batch_bool<T, A> eq (batch<T, A> const & self, batch<T, A> const & other, requires_arch<altivec>) noexcept
@@ -474,6 +487,20 @@ namespace xsimd
474487 return self.data * other.data ;
475488 }
476489
490+ // nearbyint
491+ template <class A >
492+ XSIMD_INLINE batch<float , A> nearbyint (batch<float , A> const & self,
493+ kernel::requires_arch<altivec>)
494+ {
495+ return vec_nearbyint (self.data );
496+ }
497+ template <class A >
498+ XSIMD_INLINE batch<double , A> nearbyint (batch<double , A> const & self,
499+ kernel::requires_arch<altivec>)
500+ {
501+ return vec_nearbyint (self.data );
502+ }
503+
477504 // neg
478505 template <class A , class T , class = typename std::enable_if<std::is_scalar<T>::value, void >::type>
479506 XSIMD_INLINE batch<T, A> neg (batch<T, A> const & self, requires_arch<altivec>) noexcept
@@ -549,6 +576,14 @@ namespace xsimd
549576 return hadd (self, common {});
550577 }
551578
579+ // rotate_left
580+ template <size_t N, class A , class T , class = typename std::enable_if<std::is_integral<T>::value, void >::type>
581+ XSIMD_INLINE batch<T, A> rotate_left (batch<T, A> const & self, requires_arch<altivec>) noexcept
582+ {
583+ auto rotater = vec_splats (T (N));
584+ return vec_rl (self.data , rotater);
585+ }
586+
552587 // round
553588 template <class A , class T , class = typename std::enable_if<std::is_floating_point<T>::value, void >::type>
554589 XSIMD_INLINE batch<T, A> round (batch<T, A> const & self, requires_arch<altivec>) noexcept
0 commit comments