Extensible wrapper for SIMD conditional.
Required header: #include <eve/conditional.hpp>
eve::if_ wraps a eve::logical value so that it can be either extended with an alternative value or an helper to optimize conditional operations evaluation.
| C | Type of the wrapped eve::logical value |
Public Member Functions | |
| if_ (C c) | |
| Constructs a conditional expression from a eve::logical value. | |
| template<typename V> | |
| auto | else_ (V const &v) const |
| Extends a conditional expression with an alternative value. | |
| template<typename T> | |
| auto | mask (eve::as< T > const &) const |
| Computes the eve::logical_value associated to the current conditional. | |
Public Attributes | |
| C | condition_ |
| Stored logical value. | |
Friends | |
| template<typename Ch, typename Ct> | |
| auto & | operator<< (std::basic_ostream< Ch, Ct > &os, if_ const &c) |
| Inserts a eve::if_ conditional expression into a output stream. | |
Extends a conditional expression with an alternative value.
By default, conditional operations use their unchanged input whenever the conditional evaluates to false. By using this member function, operations will use the user provided eve::value v instead.
| v | Value to use if the conditional expression evaluates to false |