Types and operations to defines conditional mask expressions.
Masking lanes from an eve::simd_value is a frequent operations. To simplify and optimize such code, EVE provides objects and functions to define conditions with a high-level of flexibility including: alternative value, index-based relative conditions and more.
See also: Conditional operations
Classes | |
| struct | eve::or_< C, V > |
| Conditional/Alternative wrapper. More... | |
| struct | eve::if_< C > |
| Extensible wrapper for SIMD conditional. More... | |
| struct | eve::ignore_all_ |
| Conditional expression selecting no lane from a eve::simd_value. More... | |
| struct | eve::ignore_none_ |
| Conditional expression selecting all lanes from a eve::simd_value. More... | |
| struct | eve::keep_first |
| Conditional expression selecting the k first lanes from a eve::simd_value. More... | |
| struct | eve::ignore_last |
| Conditional expression ignoring the k last lanes from a eve::simd_value. More... | |
| struct | eve::keep_last |
| Conditional expression keeping the k last lanes from a eve::simd_value. More... | |
| struct | eve::ignore_first |
| Conditional expression ignoring the k first lanes from a eve::simd_value. More... | |
| struct | eve::keep_between |
| Conditional expression keeping all lanes between two position. More... | |
| struct | eve::ignore_extrema |
| Conditional expression ignoring lanes at both extrema of a eve::simd_value. More... | |
Functions | |
| template<eve::relative_conditional_expr C> | |
| constexpr auto | eve::drop_alternative (C c) |
| Returns a conditional without an alternative. | |
| template<eve::relative_conditional_expr C> | |
| auto | eve::map_alternative (C c, auto op) |
| Computes a transformed conditional. | |
| template<eve::relative_conditional_expr C, typename Tgt> | |
| auto | eve::bit_cast_alternative (C c, as< Tgt > tgt) |
| Computes a transformed conditional. | |
| template<eve::relative_conditional_expr C, typename T> | |
| constexpr auto | eve::reverse_conditional (C c, eve::as< T > tgt) |
| Computes the reverse of a given eve::relative_conditional_expr. | |
Variables | |
| constexpr ignore_all_ | eve::ignore_all = {} |
| Object representing the eve::ignore_all_ conditional expression. | |
| constexpr ignore_none_ | eve::ignore_none = {} |
| Object representing the eve::ignore_none_ conditional expression. | |
| auto eve::bit_cast_alternative | ( | C | c, |
| as< Tgt > | tgt ) |
Computes a transformed conditional.
Required header: #include <eve/conditional.hpp>
Creates a eve::conditional_expr by bitcasting the alternative value of c to a new type, Tgt, if any is present.
| c | eve::conditional_expr to transform |
| tgt | Target type |
|
constexpr |
Returns a conditional without an alternative.
Required header: #include <eve/conditional.hpp>
| c | eve::conditional_expr |
| auto eve::map_alternative | ( | C | c, |
| auto | op ) |
Computes a transformed conditional.
Required header: #include <eve/conditional.hpp>
Creates a eve::conditional_expr by applying an arbitrary operation op on c, thus modifying its alternate value if any is present.
| c | eve::conditional_expr to transform |
| op | Unary callable object to apply |
|
constexpr |
Computes the reverse of a given eve::relative_conditional_expr.
Required header: #include <eve/conditional.hpp>
For a given eve::relative_conditional_expr c, optimally computes the reverse eve::relative_conditional_expr for a given type T. For example, ignoring the first N lanes get reversed as ignoring the last N lanes.
| c | Condition to reverse |
| tgt | Wrapped type of the expected output |