@@ -221,6 +221,13 @@ namespace xsimd
221
221
return vec_splats (val);
222
222
}
223
223
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
+
224
231
// store_complex
225
232
namespace detail
226
233
{
@@ -294,6 +301,32 @@ namespace xsimd
294
301
}
295
302
}
296
303
304
+ // fma
305
+ template <class A >
306
+ XSIMD_INLINE batch<float , A> fma (batch<float , A> const & x, batch<float , A> const & y, batch<float , A> const & z, requires_arch<altivec>) noexcept
307
+ {
308
+ return vec_madd (x.data , y.data , z.data );
309
+ }
310
+
311
+ template <class A >
312
+ XSIMD_INLINE batch<double , A> fma (batch<double , A> const & x, batch<double , A> const & y, batch<double , A> const & z, requires_arch<altivec>) noexcept
313
+ {
314
+ return vec_madd (x.data , y.data , z.data );
315
+ }
316
+
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
+
297
330
// eq
298
331
template <class A , class T , class = typename std::enable_if<std::is_scalar<T>::value, void >::type>
299
332
XSIMD_INLINE batch_bool<T, A> eq (batch<T, A> const & self, batch<T, A> const & other, requires_arch<altivec>) noexcept
@@ -315,6 +348,13 @@ namespace xsimd
315
348
return vec_extract (self.data , 0 );
316
349
}
317
350
351
+ // floor
352
+ template <class A , class T , class = typename std::enable_if<std::is_floating_point<T>::value, void >::type>
353
+ XSIMD_INLINE batch<T, A> floor (batch<T, A> const & self, requires_arch<altivec>) noexcept
354
+ {
355
+ return vec_floor (self.data );
356
+ }
357
+
318
358
// ge
319
359
template <class A , class T , class = typename std::enable_if<std::is_scalar<T>::value, void >::type>
320
360
XSIMD_INLINE batch_bool<T, A> ge (batch<T, A> const & self, batch<T, A> const & other, requires_arch<altivec>) noexcept
@@ -445,7 +485,6 @@ namespace xsimd
445
485
XSIMD_INLINE batch<T, A> mul (batch<T, A> const & self, batch<T, A> const & other, requires_arch<altivec>) noexcept
446
486
{
447
487
return self.data * other.data ;
448
- // return vec_mul(self.data, other.data);
449
488
}
450
489
451
490
// neg
@@ -523,6 +562,13 @@ namespace xsimd
523
562
return hadd (self, common {});
524
563
}
525
564
565
+ // round
566
+ template <class A , class T , class = typename std::enable_if<std::is_floating_point<T>::value, void >::type>
567
+ XSIMD_INLINE batch<T, A> round (batch<T, A> const & self, requires_arch<altivec>) noexcept
568
+ {
569
+ return vec_round (self.data );
570
+ }
571
+
526
572
// rsqrt
527
573
template <class A >
528
574
XSIMD_INLINE batch<float , A> rsqrt (batch<float , A> const & val, requires_arch<altivec>) noexcept
@@ -778,6 +824,13 @@ namespace xsimd
778
824
return bitwise_cast<int16_t >(swizzle (bitwise_cast<uint16_t >(self), mask, altivec {}));
779
825
}
780
826
827
+ // trunc
828
+ template <class A , class T , class = typename std::enable_if<std::is_floating_point<T>::value, void >::type>
829
+ XSIMD_INLINE batch<T, A> trunc (batch<T, A> const & self, requires_arch<altivec>) noexcept
830
+ {
831
+ return vec_trunc (self.data );
832
+ }
833
+
781
834
// zip_hi
782
835
template <class A , class T , class = typename std::enable_if<std::is_scalar<T>::value, void >::type>
783
836
XSIMD_INLINE batch<T, A> zip_hi (batch<T, A> const & self, batch<T, A> const & other, requires_arch<altivec>) noexcept
0 commit comments