@@ -221,6 +221,13 @@ namespace xsimd
221221 return vec_splats (val);
222222 }
223223
224+ // ceil
225+ template <class A , class T , class = typename std::enable_if<std::is_floating_point<T>::value, void >::type>
226+ XSIMD_INLINE batch<T, A> ceil (batch<T, A> const & self, requires_arch<altivec>) noexcept
227+ {
228+ return vec_ceil (self.data );
229+ }
230+
224231 // store_complex
225232 namespace detail
226233 {
@@ -315,6 +322,13 @@ namespace xsimd
315322 return vec_extract (self.data , 0 );
316323 }
317324
325+ // floor
326+ template <class A , class T , class = typename std::enable_if<std::is_floating_point<T>::value, void >::type>
327+ XSIMD_INLINE batch<T, A> floor (batch<T, A> const & self, requires_arch<altivec>) noexcept
328+ {
329+ return vec_floor (self.data );
330+ }
331+
318332 // ge
319333 template <class A , class T , class = typename std::enable_if<std::is_scalar<T>::value, void >::type>
320334 XSIMD_INLINE batch_bool<T, A> ge (batch<T, A> const & self, batch<T, A> const & other, requires_arch<altivec>) noexcept
@@ -523,14 +537,16 @@ namespace xsimd
523537 return hadd (self, common {});
524538 }
525539
526- // rsqrt
527- template <class A >
528- XSIMD_INLINE batch<float , A> rsqrt (batch<float , A> const & val , requires_arch<altivec>) noexcept
540+ // round
541+ template <class A , class T , class = typename std::enable_if<std::is_floating_point<T>::value, void >::type >
542+ XSIMD_INLINE batch<T , A> round (batch<T , A> const & self , requires_arch<altivec>) noexcept
529543 {
530- return vec_rsqrt (val .data );
544+ return vec_round (self .data );
531545 }
532- template <class A >
533- XSIMD_INLINE batch<double , A> rsqrt (batch<double , A> const & val, requires_arch<altivec>) noexcept
546+
547+ // rsqrt
548+ template <class A , class T , typename std::enable_if<std::is_floating_point<T>::value, void >::type>
549+ XSIMD_INLINE batch<T, A> rsqrt (batch<T, A> const & val, requires_arch<altivec>) noexcept
534550 {
535551 return vec_rsqrt (val.data );
536552 }
0 commit comments