5#ifdef ARGON_PLATFORM_MVE
16enum class MveComparison { Equal, GreaterThan, GreaterThanOrEqual };
26template <MveComparison op,
typename VectorType,
typename... PredicateType>
27[[gnu::always_inline]]
inline mve_pred16_t mve_compare(VectorType a, VectorType b, PredicateType... active) {
28 using scalar_type = mve::Scalar_t<VectorType>;
29 if constexpr (op == MveComparison::Equal) {
30 if constexpr (!std::is_integral_v<scalar_type>) {
31 return mve::compare_equal(a, b, active...);
33 return mve::equal(a, b, active...);
35 }
else if constexpr (op == MveComparison::GreaterThan) {
36 if constexpr (!std::is_integral_v<scalar_type>) {
37 return mve::compare_greater_than(a, b, active...);
38 }
else if constexpr (std::is_signed_v<scalar_type>) {
39 return mve::greater_than(a, b, active...);
41 return mve::higher(a, b, active...);
44 if constexpr (!std::is_integral_v<scalar_type>) {
45 return mve::compare_greater_than_or_equal(a, b, active...);
46 }
else if constexpr (std::is_signed_v<scalar_type>) {
47 return mve::greater_than_or_equal(a, b, active...);
49 return mve::higher_or_same(a, b, active...);
58template <
typename VectorType>
61 using mask_scalar = mve::Scalar_t<mask_type>;
62 return mve::predicate_select(mve::duplicate(
static_cast<mask_scalar
>(~mask_scalar{0})),
63 mve::duplicate(mask_scalar{0}), p);
Header file for SIMD features and platform detection.
Contains helper templates and concepts for type manipulation and compile-time utilities.
Definition argon.hpp:156
Bool< T >::type Bool_t
Helper alias to get the boolean type of a SIMD operation.
Definition bool.hpp:49