E.V.E
v2023.02.15
Loading...
Searching...
No Matches

Detailed Description

Conditional expression ignoring the k last lanes from a eve::simd_value.

Required header: #include <eve/conditional.hpp>

Public Member Functions

constexpr ignore_last (std::ptrdiff_t n) noexcept
 Construct an eve::relative_conditional_expr that will ignore the n last lanes.
template<typename V>
constexpr auto else_ (V const &v) const
 Extends a conditional expression with an alternative value.
template<typename T>
as_logical_t< T > mask (eve::as< T > tgt) const
 Computes the eve::logical_value associated to the current conditional.
template<typename T>
constexpr std::ptrdiff_t count (eve::as< T > tgt) const
 Number of lanes to be left unmasked.
constexpr bool friend operator== (ignore_last const &, ignore_last const &)=default
 Checks equality between two eve::ignore_last instances.

Friends

template<typename Ch, typename Ct>
auto & operator<< (std::basic_ostream< Ch, Ct > &os, ignore_last const &c)
 Inserts a eve::ignore_last conditional expression into a output stream.

Member Function Documentation

◆ else_()

template<typename V>
auto eve::ignore_last::else_ ( V const & v) const
inlineconstexpr

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.

Parameters
vValue to use if the conditional expression evaluates to false
Returns
An instance of eve::or_ wrapping current conditional expression with v.